Example #1
0
 void WhaleHarpooned()
 {
     if (targetWhale)
     {
         targetWhale.GetComponent <Health>().Damage(DamageAmt);
         targetWhale.GetComponent <Health>().onHealed.AddListener(HarpoonRopeCut);
         StartCoroutine(pullWhale());
     }
 }
Example #2
0
        public void RegisterFish(WhaleBehaviour whale)
        {
            Health hlth = whale.GetComponent <Health>();

            hlth.onDie.AddListener(FishTakenAway);
            hlth.onHealed.AddListener(FishSaved);
            remainingFishes++;
            Debug.Log("Fishes total " + remainingFishes);
        }