Пример #1
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if(other.CompareTag("BodyKuroko")){
            kuController= other.gameObject.GetComponentInParent<KurokoController> ();
            kuController.HitEnemy(1);
        }
        if(other.CompareTag("BodyHanzo")){
            haController= other.gameObject.GetComponentInParent<HanzoController> ();
            haController.HitEnemy(1);

        }
    }
Пример #2
0
 // Use this for initialization
 void Start()
 {
     controller = GetComponent<KurokoController> ();
     player = GameObject.FindWithTag ("Player").transform;
     //StartCoroutine (Run ());
 }