コード例 #1
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.tag == "Player")
     {
         PlayerPrefs.SetString("lastLoadedScene", SceneManager.GetActiveScene().name);
         DeathScript.DestroyPlayer();
         onExit.Invoke();
     }
 }
コード例 #2
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.tag == "Player")
     {
         PlayerPrefs.SetString("lastLoadedScene", SceneManager.GetActiveScene().name);
         DeathScript.DestroyPlayer();
         GetComponent <Animator>().SetTrigger("Jump");
         Camera.main.GetComponent <CameraFollowScript>().follow = gameObject;
     }
 }
コード例 #3
0
ファイル: DeathManager.cs プロジェクト: Borhink/HotlineParis
 public void checkWin()
 {
     if (!DeathScript.player)
     {
         return;
     }
     if (enemyNB > 0)
     {
         return;
     }
     MenuManagerScript.mm.setMissionCompleteMenu(true);
     DeathScript.playSound(winSound);
     DeathScript.DestroyPlayer();
     enemyNB = -1;
 }