Пример #1
0
    void Start()
    {
        _player = GetComponent <Player>();

        castle        = GameObject.Find("Castle");
        c             = castle.GetComponent <Castle>();
        castle_MAX_HP = c.GetHealth();

        winObj  = GameObject.Find("WinText");
        winTxt  = winObj.GetComponent <Text>();
        lossObj = GameObject.Find("LossText");
        lossTxt = lossObj.GetComponent <Text>();
    }
Пример #2
0
 /// <summary>
 /// Set castleHP at begging of the round
 /// Call this method on "On Start Wave" Unity Event
 /// </summary>
 public void SetCastleHP()
 {
     old_castleHP = c.GetHealth();
 }
Пример #3
0
 public void Heal()
 {
     CameraShake.cameraShake.Shake(shakeAmount, shakeLength);
     castle.GetHealth(30);
 }