public void OnRabbitDeath(HeroRabbit rb, bool instantly) { if (!rb.isDead) { health -= 1; } if (instantly) { Transform rbt = rb.transform; rbt.position = this.startPos; } else { if (rb.isBig()) { rb.resizeMakeSmall(); health += 1; return; } StartCoroutine(DeathAnimation(rb)); } if (health <= 0) { LevelLoader ll = new LevelLoader(); ll.SceneName = "LevelChoose"; ll.load(); } }
protected override void OnRabitHit(HeroRabbit rabit) { if (!rabit.isBig()) { rabit.resizeMakeBig(); } this.CollectedHide(); }
protected override void OnRabitHit(HeroRabbit rabit) { if (rabit.isBig()) { rabit.resizeMakeSmall(); } else { LevelController.current.OnRabbitDeath(rabit, false); } this.CollectedHide(); }