コード例 #1
0
 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();
     }
 }
コード例 #2
0
 protected override void OnRabitHit(HeroRabbit rabit)
 {
     if (!rabit.isBig())
     {
         rabit.resizeMakeBig();
     }
     this.CollectedHide();
 }
コード例 #3
0
ファイル: BombBehaviour.cs プロジェクト: vvok12/UnityProject
 protected override void OnRabitHit(HeroRabbit rabit)
 {
     if (rabit.isBig())
     {
         rabit.resizeMakeSmall();
     }
     else
     {
         LevelController.current.OnRabbitDeath(rabit, false);
     }
     this.CollectedHide();
 }