Ejemplo n.º 1
0
        // Update on UI and Health
        private void TextFailed( )
        {
            // do something on UI and on health system as well.

            healthController.TakeDamage(1);
            textManager.HealthUpdate(healthController.GetHealth( ));
            if (healthController.IsItDead( ))
            {
                textManager.LostGameMessage( );
                inputManager.DeactivateOrActivateInput( );
                return;
            }

            textManager.ResetWord();
        }
Ejemplo n.º 2
0
        private void Awake( )
        {
            gameStateController = GameStateController.GetSingletonInstance( );
            wordFileReader      = WordFileController.GetSingletonInstance( );
            healthController    = HealthController.GetSingletonInstance( );
            healthController.InitializeHealth( );

            textManager = GameObject.Find("TextAnchor").GetComponent <TextManager> ( );
            textManager.HealthUpdate(healthController.GetHealth( ));

            inputManager = gameObject.GetComponent <InputManager> ( );
            levelManager = gameObject.GetComponent <LevelManager> ( );
        }
Ejemplo n.º 3
0
 // Update is called once per frame
 void Update()
 {
     Bar.transform.localScale = new Vector3(Background.transform.localScale.x * healthSystem.GetHealth(), Background.transform.localScale.y, Background.transform.localScale.z);
 }