1. var health1 : Texture2D; // One life left
  2. var health2 : Texture2D; // Two lifes left
  3. var health3 : Texture2D; // Full health
  4.  
  5.  
  6. static var LIVES = 3;
  7.  
  8. function Update () {
  9. if (LIVES==3)
  10. {
  11. guiTexture.texture = health3;
  12. }
  13. else if (LIVES==2)
  14. {
  15. guiTexture.texture = health2;
  16. }
  17. else if (LIVES==1)
  18. {
  19. guiTexture.texture = health1;
  20. }
  21. else if(LIVES==0)
  22. {
  23. //Game Over
  24. }
  25. }