Esempio n. 1
0
    void OnTriggerEnter(Collider other)
    {
        XKNpcMoveCtrl npcMoveCom = other.gameObject.GetComponent <XKNpcMoveCtrl>();

        if (npcMoveCom != null && npcMoveCom.IsCaiPiaoZhanChe)
        {
            //Debug.Log("Unity: OnTriggerEnter******************name === " + npcMoveCom.name);
            //彩票战车和boss进入摄像机盒子.
            npcMoveCom.SetIsEnterCameraBox();
        }
    }
Esempio n. 2
0
    void OnTriggerEnter(Collider other)
    {
        XKNpcMoveCtrl npcMoveCom = other.gameObject.GetComponent <XKNpcMoveCtrl>();

        if (npcMoveCom != null && npcMoveCom.IsCaiPiaoZhanChe)
        {
            //Debug.Log("Unity: OnTriggerEnter******************name === " + npcMoveCom.name);
            //彩票战车和boss进入摄像机盒子.
            bool isEnter = false;
            switch (m_TriggerState)
            {
            case TriggerState.JPBoss:
            {
                if (npcMoveCom.GetIsBossNpc() == true)
                {
                    isEnter = true;
                }

                if (npcMoveCom.IsCaiPiaoZhanChe == false)
                {
                    //普通npc进入JPBoss的镜头范围盒子.
                    if (XkPlayerCtrl.GetInstanceFeiJi() != null)
                    {
                        if (XkPlayerCtrl.GetInstanceFeiJi().m_SpawnNpcManage != null)
                        {
                            XkPlayerCtrl.GetInstanceFeiJi().m_SpawnNpcManage.AddPuTongNpcToBuJiDt(npcMoveCom.gameObject);
                        }
                    }
                }
                break;
            }

            case TriggerState.ZhanCheBoss:
            {
                if (npcMoveCom.GetIsBossNpc() == false)
                {
                    isEnter = true;
                }
                break;
            }
            }

            if (isEnter == true)
            {
                npcMoveCom.SetIsEnterCameraBox();
            }
        }
    }