Exemplo n.º 1
0
 private void OnCollisionEnter(Collision other)
 {
     if (other.collider.tag == "Moving_Platform")
     {
         print("enter platform  :)" + other.collider.name);
         this.transform.parent = other.collider.transform;
         _parentCount++;
     }
     if (other.collider.tag == "Enemy")
     {
         _enemyController = other.collider.GetComponent <IEnemyController>();
         _enemyController.Damage(this.gameObject);
     }
 }