Esempio n. 1
0
    private void OnRecvUnloadEquip(int newPos, int tarPos)
    {
        ShowCellView(tarPos);
        if (mAvatar == null)
        {
            return;
        }
        XEquip dressEquip = GTDataManager.Instance.GetEquipDataByPos(EPosType.RoleEquip, tarPos);

        mAvatar.ChangeAvatar(tarPos, 0);
    }
Esempio n. 2
0
    private void ShowModelView()
    {
        XCharacter role = GTGlobal.Main;
        DActor     db   = ReadCfgActor.GetDataById(role.Id);

        mRender = ERender.AddRender(modelTexture);
        mAvatar = GTWorld.Instance.AddAvatar(db.Model);
        if (mAvatar == null)
        {
            return;
        }
        for (int i = 1; i <= 8; i++)
        {
            XEquip dressEquip = GTDataManager.Instance.GetEquipDataByPos(EPosType.RoleEquip, i);
            int    id         = dressEquip == null ? 0 : dressEquip.Id;
            mAvatar.ChangeAvatar(i, id);
        }
        mAvatar.PlayAnim("idle", null);
        GameObject model = mRender.AddModel(mAvatar.GetRootObj());

        model.transform.localPosition    = new Vector3(0, -0.8f, 2.7f);
        model.transform.localEulerAngles = new Vector3(0, 180, 0);
    }