Ejemplo n.º 1
0
 protected override void OnRabitHit(HeroRabit rabit)
 {
     if (!rabit.SuperRabit)
     {
         this.CollectedHide();
         if (rabit.IsBig)
         {
             rabit.BecomeSmaller();
             rabit.SuperRabit = true;
         }
         else
         {
             rabit.DieWithAnimation();
         }
     }
 }
    public void OnRabitDeath(HeroRabit rabit)
    {
        if (SoundManager.Instance.isSoundOn() && deathSound != null)
        {
            deathSource.Play();
        }
        rabit.transform.position = this.startingPosition;
        SpriteRenderer renderer = rabit.GetComponent <SpriteRenderer> ();

        renderer.flipX = false;
        removeLife();
        if (rabit.IsBig)
        {
            rabit.BecomeSmaller();
        }
    }