Example #1
0
    void OnTriggerEnter(Collider collider)
    {
        if (m_MonsterMove.m_State == MonsterMove.EM_STATE.DIE)
        {
            return;
        }

        MoveController moveController = collider.GetComponent <MoveController>();

        if (moveController && moveController.m_IsDie == false)
        {
            moveController.DoDie();
        }
    }
Example #2
0
    void OnTriggerEnter(Collider collider)
    {
        MoveController moveController = collider.GetComponent <MoveController>();

        if (moveController && moveController.m_IsDie == false)
        {
            GamePlay.m_Life = 0;
            moveController.DoDie();
        }

        MonsterMove monsterMove = collider.GetComponent <MonsterMove>();

        if (monsterMove)
        {
            Destroy(monsterMove.gameObject);
        }
    }