コード例 #1
0
 private void ExplodePortal()
 {
     RaceStageUIController.portalsKilled++;
     rend         = GetComponent <Renderer>();
     rend.enabled = true;
     DeathScream.playDeathScreamPortal();
     Debug.Log("ExplodePortal()");
     GetComponent <MeshExploder>().Explode();
     Destroy(gameObject);
 }
コード例 #2
0
 void OnParticalCollision(GameObject other)
 {
     if (other.tag == "Player")
     {
         rend         = GetComponent <Renderer>();
         rend.enabled = true;
         DeathScream.playDeathScreamPortal();
         GetComponent <MeshExploder>().Explode();
         Destroy(gameObject);
     }
 }
コード例 #3
0
 void OnTriggerEnter(Collider other)
 {
     print(gameObject.GetType());
     if (other.gameObject.tag == "Player")
     {
         rend         = GetComponent <Renderer>();
         rend.enabled = true;
         DeathScream.playDeathScreamPortal();
         GetComponent <MeshExploder>().Explode();
         Destroy(gameObject);
     }
 }