Наследование: MonoBehaviour
Пример #1
0
 //checks if the collider object is ChasingEnemy, is so flip it.
 void OnTriggerEnter2D(Collider2D col)
 {
     if (col.gameObject.name.Contains("ChasingEnemy"))
     {
         chase = col.GetComponent<ChasingMonster>();
         chase.FlipEnemy();
     }
 }
Пример #2
0
 //checks if the collider object is ChasingEnemy, is so flip it.
 void OnTriggerEnter2D(Collider2D col)
 {
     if (col.gameObject.name.Contains("ChasingEnemy"))
     {
         chase = col.GetComponent <ChasingMonster>();
         chase.FlipEnemy();
     }
 }