示例#1
0
        public GRCharacter3D createGraphChar(Variant conf)
        {
            GRCharacter3D gRCharacter3D = this._world.createEntity(Define.GREntityType.CHARACTER) as GRCharacter3D;

            gRCharacter3D.load(conf, null, null);
            return(gRCharacter3D);
        }
示例#2
0
        public GRCharacter3D createGraphChar(Variant conf)
        {
            GRCharacter3D m_cha =
                _world.createEntity(Define.GREntityType.CHARACTER) as GRCharacter3D;

            m_cha.load(conf);
            return(m_cha);
        }
示例#3
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");
                        });
                    });
                });
            });
        }