Esempio n. 1
0
    private void OnCollisionEnter(Collision collision)
    {
        Transform tr = collision.transform;
        PlayerCtr pc = tr.GetComponentInParent <PlayerCtr>();

        if (pc != null)
        {
            Direction dir = Utils.GetDirection(transform, tr);
            Debug.Log(transform.parent.name + "===" + dir.ToString());
            Ctr.MoveInstance.PauseMove(true);

            EnemyCtrs.Add(pc);
            if (!InWar)
            {
                InvokeRepeating("Attack", 0f, 1f);
            }
        }
    }