Ejemplo n.º 1
0
 void CancelShowInfoBtClick()
 {
     m_roleParticle.SetActive(true);
     m_LeftAttrView_02.SetActive(false);
     m_CancelShowInfoBt.SetActive(false);
     m_ShowMoreInfoBt.SetActive(true);
     //打开预览模型
     GameManager.gameManager.ActiveScene.ShowFakeObj();
     //播放站立动作
     if (null != m_PlayerFakeObj)
     {
         m_PlayerFakeObj.PlayAnim(0);
     }
 }
Ejemplo n.º 2
0
    private void CreatePartnerFakeObj(int pro, int modelVisualID)
    {
        if (m_PlayerFakeObj != null)
        {
            DestroyPartnerFakeObj();
        }
        CharacterDefine.PROFESSION profession = (CharacterDefine.PROFESSION)pro;
        //对应FakeObject.txt配置
        int fakeObjId = -1;

        switch (profession)
        {
        case CharacterDefine.PROFESSION.SHAOLIN:
            fakeObjId = 7;
            break;

        case CharacterDefine.PROFESSION.TIANSHAN:
            fakeObjId = 8;
            break;

        case CharacterDefine.PROFESSION.DALI:
            fakeObjId = 10;
            break;

        case CharacterDefine.PROFESSION.XIAOYAO:
            fakeObjId = 9;
            break;

        case CharacterDefine.PROFESSION.GAIBANG:
            fakeObjId = 62;
            break;

        default:
            fakeObjId = 7;
            break;
        }

        m_PlayerFakeObj = new FakeObject();
        if (m_PlayerFakeObj == null)
        {
            return;
        }
        //fakeObjId = 8;
        //	m_PlayerFakeObjID = fakeObjId;
        GameObject temFakeObject = null;

        m_PlayerFakeObj.initFakeObject(fakeObjId, GameManager.gameManager.ActiveScene.FakeObjTrans, out temFakeObject, modelVisualID, (int)profession);

        if (m_PlayerFakeObj != null)
        {
            m_PlayerFakeObj.PlayAnim(0);
        }

        GameManager.gameManager.ActiveScene.ShowFakeObj();
        //if (null != m_PlayerFakeObj.ObjAnim)
        //	m_ModelDrag.ModelTrans = m_PlayerFakeObj.ObjAnim.transform;
    }
Ejemplo n.º 3
0
    private void InitFake()
    {
        if (fakeId == 67)
        {
            GameManager.gameManager.ActiveScene.InitFakeObjRoot(m_FakeObjTopLeft, m_FakeObjBottomRight);
        }
        else if (fakeId == 79)
        {
            GameManager.gameManager.ActiveScene.InitFakeObjRoot(m_FellowFakeObjTopLeft, m_FellowFakeObjBottomRight);
        }

        GameManager.gameManager.ActiveScene.ShowFakeObj();

        if (m_PlayerFakeObj != null)
        {
            DestroyFakeObj();
        }
        m_PlayerFakeObj = new FakeObject();
        if (m_PlayerFakeObj == null)
        {
            return;
        }

        GameObject temFakeObject = null;

        m_PlayerFakeObj.initFakeObject(fakeId, GameManager.gameManager.ActiveScene.FakeObjTrans, out temFakeObject);

        if (m_PlayerFakeObj != null)
        {
            m_PlayerFakeObj.PlayAnim(0);
        }

        //加上旋转
        if (temFakeObject != null)
        {
            temFakeObject.transform.localRotation = Quaternion.identity;
            Spin newSpin = temFakeObject.AddComponent <Spin>();
            if (newSpin != null)
            {
                newSpin.rotationsPerSecond.x = 0.0f;
                newSpin.rotationsPerSecond.y = 0.1f;
                newSpin.rotationsPerSecond.z = 0.0f;
            }
        }
    }