コード例 #1
0
 public void OnTriggerEnter2D(Collider2D player)
 {
     if (player.tag == "Player")
     {
         scenemanager.reloadScene();
     }
 }
コード例 #2
0
 private void OnTriggerEnter2D(Collider2D other)
 {
     switch (other.tag)
     {
     case "Blade":
         Physics2D.gravity = new Vector2(0, -9.8f);
         scenemanager.reloadScene();
         break;
     }
 }