Esempio n. 1
0
    private void ShowRelicsObj()
    {
        DRelics db = ReadCfgRelics.GetDataById(centerID);

        if (mRender == null)
        {
            mRender = ERender.AddRender(mModelTexture);
        }
        mRender.DelAllModels();
        mModel = mRender.AddModel(db.Model);
        if (mModel == null)
        {
            return;
        }
        mModel.SetActive(true);

        DStage ds = ReadCfgStageRelics.GetDataById(centerID);

        mModel.transform.localPosition    = new Vector3(ds.X, ds.Y, ds.Z);
        mModel.transform.localEulerAngles = new Vector3(0, 180, 0);
        mModel.transform.localScale       = Vector3.one;
        GameObject effect = GTWorld.Instance.Ect.LoadEffectObj(db.ActiveEffectID);

        if (effect == null)
        {
            return;
        }
        mRender.AddModel(effect);
        effect.transform.parent        = mModel.transform;
        effect.transform.localPosition = Vector3.zero;
        effect.transform.localRotation = Quaternion.identity;
        effect.transform.localScale    = Vector3.one;
    }
Esempio n. 2
0
    private void ShowDialogueModel(DDialogue db)
    {
        DActor actorDB = null;

        if (db.Actor == 0)
        {
            XCharacter role = GTGlobal.Main;
            actorDB = ReadCfgActor.GetDataById(role.Id);
        }
        else
        {
            actorDB = ReadCfgActor.GetDataById(db.Actor);
        }

        if (actorDB == null)
        {
            return;
        }
        if (dlgRenderer != null)
        {
            dlgRenderer.DelAllModels();
        }
        else
        {
            dlgRenderer = ERender.AddRender(dlgTexture);
        }
        dlgAvatar = GTWorld.Instance.AddAvatar(actorDB.Model);
        dlgAvatar.PlayAnim(db.Anim, null);
        dlgRenderer.AddModel(dlgAvatar.GetRootObj());
        dlgAvatar.GetRootObj().transform.localPosition = new Vector3(-0.22f, -1.61f, 1.0f);
        dlgAvatar.GetRootObj().transform.localEulerAngles = new Vector3(0, 180, 0);
    }
Esempio n. 3
0
    private void InitModel()
    {
        DActor db = ReadCfgActor.GetDataById(selectID);

        mRender = ERender.AddRender(modelTexture);
        mRender.DelAllModels();
        mAvatar = GTWorld.Instance.AddAvatar(db.Model);
        mAvatar.PlayAnim("idle", null);
        GameObject model = mRender.AddModel(mAvatar.GetRootObj());
        DStage     ds    = ReadCfgStagePartner.GetDataById(selectID);

        model.transform.localPosition    = new Vector3(ds.X, ds.Y, ds.Z);
        model.transform.localEulerAngles = new Vector3(0, 180, 0);
        model.transform.localScale       = Vector3.one * ds.Scale * 0.3f;
    }
Esempio n. 4
0
    private void ShowModel()
    {
        DActor db = ReadCfgActor.GetDataById(mSelectMountID);

        if (db == null)
        {
            mRender = ERender.DelRender(mRender);
            return;
        }
        if (mRender == null)
        {
            mRender = ERender.AddRender(modelTexture);
        }
        mRender.DelAllModels();
        mAvatar = CharacterManager.Instance.AddAvatar(db.Model);
        mAvatar.PlayAnim("idle", null);
        GameObject model = mRender.AddModel(mAvatar.GetRootObj());

        model.transform.localPosition    = db.StagePos;
        model.transform.localEulerAngles = new Vector3(0, 120, 0);
        model.transform.localScale       = new Vector3(db.StageScale, db.StageScale, db.StageScale);
    }
Esempio n. 5
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);
    }
Esempio n. 6
0
    private void ShowModel()
    {
        DActor db = ReadCfgActor.GetDataById(mSelectMountID);

        if (db == null)
        {
            mRender = ERender.DelRender(mRender);
            return;
        }
        if (mRender == null)
        {
            mRender = ERender.AddRender(modelTexture);
        }
        mRender.DelAllModels();
        mAvatar = GTWorld.Instance.AddAvatar(db.Model);
        mAvatar.PlayAnim("idle", null);
        GameObject model = mRender.AddModel(mAvatar.GetRootObj());
        DStage     ds    = ReadCfgStageMount.GetDataById(mSelectMountID);

        model.transform.localPosition    = new Vector3(ds.X, ds.Y, ds.Z);
        model.transform.localEulerAngles = new Vector3(0, 120, 0);
        model.transform.localScale       = Vector3.one * ds.Scale * 1.2f;
    }