예제 #1
0
 private void OnTriggerExit2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "Rampart")
     {
         rampart = null;
         RampartOffRange(this);
     }
 }
예제 #2
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "Rampart")
     {
         rampart = collision.GetComponent <Rampart>();
         RampartOnRange(this);
     }
 }