예제 #1
0
파일: Robot.cs 프로젝트: nexartic/Portfolio
 private void OnCollisionEnter2D(Collision2D collision)
 {
     if (collision.gameObject.CompareTag("Player") && !isOne)
     {
         isOne = true;
         MessageSystemPlayingScene.Player.GetComponent <Animator>().SetBool("IsDeath", true);
         MessageSystemPlayingScene.GeneralyPartOfDeath();
         robDead.Death();
     }
     if (collision.gameObject.CompareTag("Hit") && !isOne)
     {
         isOne = true;
         robDead.Death();
     }
 }
예제 #2
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.CompareTag("Player") && !robotScript.IsOne)
     {
         robotScript.IsOne = true;
         robDead.Death();
         MessageSystemPlayingScene.Player.GetComponent <Animator>().SetBool("IsDeath", true);
         MessageSystemPlayingScene.GeneralyPartOfDeath();
     }
 }
예제 #3
0
 public void RobotDeathAfterEvaStrike()
 {
     robDead.Death();
 }