예제 #1
0
 public void OnTriggerExit2D(Collider2D other)
 {
     if (other.tag == "Player")
     {
         player     = null;
         canTrigger = false;
     }
 }
예제 #2
0
 public void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "Player")
     {
         player     = other.GetComponent <LightShadowForm>();
         canTrigger = true;
     }
 }