コード例 #1
0
ファイル: GRClient.cs プロジェクト: atom-chen/rongyaojt
        public GRCharacter3D createGraphChar(Variant conf)
        {
            GRCharacter3D gRCharacter3D = this._world.createEntity(Define.GREntityType.CHARACTER) as GRCharacter3D;

            gRCharacter3D.load(conf, null, null);
            return(gRCharacter3D);
        }
コード例 #2
0
ファイル: creatchar.cs プロジェクト: atom-chen/rongyaojt
        protected void initMesh()
        {
            GameObject gameObject = U3DAPI.U3DResLoad <GameObject>("creatchar/cc_scene");
            bool       flag       = gameObject != null;

            if (flag)
            {
                this.m_theScene = UnityEngine.Object.Instantiate <GameObject>(gameObject);
            }
            this.m_skmesh_cc_male = (GRClient.instance.world.createEntity(Define.GREntityType.CHARACTER) as GRCharacter3D);
            this.m_skmesh_cc_male.load(GraphManager.singleton.getCharacterConf("0"), null, null);
            this.m_skmesh_cc_male.applyAvatar(GraphManager.singleton.getAvatarConf("0", "10000"), null);
            this.m_skmesh_cc_male.pos  = new Vec3(0.1f, -100f, 1.5f);
            this.m_skmesh_cc_male.rotY = 317f;
            this.m_skmesh_cc_female    = (GRClient.instance.world.createEntity(Define.GREntityType.CHARACTER) as GRCharacter3D);
            this.m_skmesh_cc_female.load(GraphManager.singleton.getCharacterConf("1"), null, null);
            this.m_skmesh_cc_female.applyAvatar(GraphManager.singleton.getAvatarConf("1", "10001"), null);
            this.m_skmesh_cc_female.pos  = new Vec3(0.1f, -100f, 1.5f);
            this.m_skmesh_cc_female.rotY = 297f;
            GRClient.instance.getGraphCamera().visible = false;
            this.m_bMale_BodyHair_Loaded   = false;
            this.m_bMale_Weapon_Loaded     = false;
            this.m_bFemale_BodyHair_Loaded = false;
            this.m_bFemale_Weapon_Loaded   = false;
        }
コード例 #3
0
ファイル: creatchar.cs プロジェクト: atom-chen/rongyaojt
        private void onTab(TabControl t)
        {
            bool flag = t.getSeletedIndex() == 0;

            if (flag)
            {
                this.curSK = this.m_skmesh_cc_male;
                this.m_skmesh_cc_male.pos   = new Vec3(0.1f, -100f, 1.5f);
                this.m_skmesh_cc_female.pos = new Vec3(0.1f, -100f, 1.5f);
                this.sex = 0u;
            }
            else
            {
                this.curSK = this.m_skmesh_cc_female;
                this.m_skmesh_cc_male.pos   = new Vec3(0.1f, -100f, 1.5f);
                this.m_skmesh_cc_female.pos = new Vec3(0.1f, -100f, 1.5f);
                this.sex = 1u;
            }
            bool flag2 = this.sex == 0u;

            if (flag2)
            {
                this.curSK.pos = new Vec3(0.1f, -0.15f, 1.5f);
            }
            else
            {
                this.curSK.pos = new Vec3(0.1f, 0f, 1.5f);
            }
            this.curSK.playAnimation("idle", 0);
        }
コード例 #4
0
        public GRCharacter3D createGraphChar(Variant conf)
        {
            GRCharacter3D m_cha =
                _world.createEntity(Define.GREntityType.CHARACTER) as GRCharacter3D;

            m_cha.load(conf);
            return(m_cha);
        }
コード例 #5
0
        public bool IsRunningAni()
        {
            if (grAvatar != null)
            {
                GRCharacter3D curchar = (this as LGAvatarGameInst).grAvatar.m_char;
                if (curchar != null)
                {
                    return(curchar.IsRunningAnim());
                }
            }

            return(false);
        }
コード例 #6
0
        public void startMount(string id)
        {
            bool flag = this.m_skMount == null;

            if (flag)
            {
                this.m_skMount = (GRClient.instance.world.createEntity(Define.GREntityType.CHARACTER) as GRCharacter3D);
                this.m_skMount.load(GraphManager.singleton.getCharacterConf(id), null, null);
                this.m_tfChar       = this.m_char.gameObject.transform.parent;
                this.m_tfMount      = this.m_skMount.gameObject.transform.parent;
                this.m_blinkToMount = true;
                this.m_char.playAnimation("mount_idle", 0);
            }
        }
コード例 #7
0
        public void disMount()
        {
            bool flag = this.m_skMount != null;

            if (flag)
            {
                bool flag2 = !this.m_blinkToMount;
                if (flag2)
                {
                    this.m_char.gameObject.transform.SetParent(this.m_tfChar, false);
                    this.m_skMount.gameObject.transform.SetParent(this.m_tfMount, false);
                }
                this.m_skMount.dispose();
                this.m_skMount = null;
                this.m_char.playAnimation("idle", 0);
            }
        }
コード例 #8
0
ファイル: LGAvatar.cs プロジェクト: atom-chen/rongyaojt
        public bool IsRunningAni()
        {
            bool flag = this.grAvatar != null;
            bool result;

            if (flag)
            {
                GRCharacter3D @char = (this as LGAvatarGameInst).grAvatar.m_char;
                bool          flag2 = @char != null;
                if (flag2)
                {
                    result = @char.IsRunningAnim();
                    return(result);
                }
            }
            result = false;
            return(result);
        }
コード例 #9
0
ファイル: creatchar.cs プロジェクト: atom-chen/rongyaojt
        public override void dispose()
        {
            MediaClient.instance.StopSoundUrls(null);
            bool flag = this.m_theScene != null;

            if (flag)
            {
                UnityEngine.Object.Destroy(this.m_theScene);
                this.m_theScene = null;
            }
            this.m_skmesh_cc_male.dispose();
            this.m_skmesh_cc_male = null;
            this.m_skmesh_cc_female.dispose();
            this.m_skmesh_cc_female = null;
            this.curSK = null;
            this.tab.dispose();
            this.tab = null;
            base.getEventTrigerByPath("mousebg").clearAllListener();
            base.getEventTrigerByPath("btrename").clearAllListener();
            base.getEventTrigerByPath("btcreate").clearAllListener();
            this.input.onValueChange.RemoveAllListeners();
            base.dispose();
        }
コード例 #10
0
        protected void _debugAvatar()
        {
            new CrossApp(true);

            ConfigManager confMgr = CrossApp.singleton.getPlugin("conf") as ConfigManager;

            confMgr.loadExtendConfig("gconf/avatar", (Variant v) =>
            {
                GraphManager.singleton._formatAvatarConf(v);

                confMgr.loadExtendConfig("gconf/effect", (Variant vv) =>
                {
                    GraphManager.singleton._formatEffectConf(vv);

                    confMgr.loadExtendConfig("gconf/material", (Variant vvv) =>
                    {
                        GraphManager.singleton._formatMaterialConf(vvv);

                        m_world = GraphManager.singleton.createWorld3D("main");

                        m_world.cam.pos = new Vec3(0, 0, 4);
                        m_world.cam.lookAt(new Vec3(0, 0, 0));

                        m_char = m_world.createEntity(Define.GREntityType.CHARACTER) as GRCharacter3D;
                        m_char.load(GraphManager.singleton.getCharacterConf("0"));
                        m_char.applyAvatar(GraphManager.singleton.getAvatarConf("0", "2016"));
                        m_char.applyAvatar(GraphManager.singleton.getAvatarConf("0", "9999"));

                        os.sys.addGlobalEventListener(Define.EventType.UI_MOUSE_UP, (Cross.Event e) =>
                        {
                            m_char.removeAvatar("wing");
                        });
                    });
                });
            });
        }