Ejemplo n.º 1
0
    void OnTriggerEnter(Collider col)
    {
        ICT_Engine.MoveOnPathScript mscript =
            col.transform.GetComponent <ICT_Engine.MoveOnPathScript>();

        if (mscript.name == transform.parent.name)
        {
            //Debug.Log("End Action1");
            mscript.EndAction();
        }
    }
Ejemplo n.º 2
0
    private void OnControllerColliderHit(ControllerColliderHit hit)
    {
        string hitName = hit.transform.name.ToString().Split('_')[1].ToLower();

        if (thisName != hitName)
        {
            return;
        }

        ICT_Engine.MoveOnPathScript mscript =
            hit.transform.GetComponent <ICT_Engine.MoveOnPathScript>();

        if (mscript.name == transform.parent.name)
        {
            Debug.Log("End Action2");
            mscript.EndAction();
        }
    }