예제 #1
0
 private void FirstTimeInit()
 {
     if (this._equipment != null)
     {
         if (this._tableauScene == null)
         {
             this._tableauScene = Scene.CreateNewScene(true);
             this._tableauScene.SetName("CharacterTableau");
             this._tableauScene.DisableStaticShadows(true);
             this._agentRendererSceneController = MBAgentRendererSceneController.CreateNewAgentRendererSceneController(this._tableauScene, 32);
             SceneInitializationData initData = new SceneInitializationData(true);
             initData.InitPhysicsWorld = false;
             this._tableauScene.Read("inventory_character_scene", initData);
             this._tableauScene.SetShadow(true);
             this._camPos          = this._tableauScene.ReadAndCalculateInitialCamera();
             this._mountSpawnPoint = this._tableauScene.FindEntityWithTag("horse_inv").GetGlobalFrame();
             MatrixFrame globalFrame = this._tableauScene.FindEntityWithTag("agent_inv").GetGlobalFrame();
             this._frame             = globalFrame;
             this._initialSpawnFrame = globalFrame;
             this._tableauScene.RemoveEntity(this._tableauScene.FindEntityWithTag("agent_inv"), 99);
             this._tableauScene.RemoveEntity(this._tableauScene.FindEntityWithTag("horse_inv"), 100);
         }
         if (this._agentVisuals != null)
         {
             this._agentVisuals.Reset();
             this._agentVisuals = null;
         }
         if (this._bodyProperties != BodyProperties.Default)
         {
             this._agentVisuals = AgentVisuals.Create(new AgentVisualsData().Banner(this._banner).Equipment(this._equipment).BodyProperties(this._bodyProperties).Frame(this._frame).UseMorphAnims(true).ActionSet(MBGlobals.HumanWarriorActionSet).ActionCode(SpouseCharacterTableau.act_inventory_idle_start).Scene(this._tableauScene).Monster(Game.Current.HumanMonster).PrepareImmediately(true).SkeletonType(this._isFemale ? SkeletonType.Female : SkeletonType.Male).ClothColor1(this._clothColor1).ClothColor2(this._clothColor2), "CharacterTableaue", true, false);
             this._agentVisuals.SetAgentLodLevelExternal(0f);
         }
         this._initialized = true;
     }
 }
예제 #2
0
        public void OnFinalize()
        {
            if (this._continuousRenderCamera != null)
            {
                this._continuousRenderCamera.ReleaseCameraEntity();
                this._continuousRenderCamera = null;
            }
            AgentVisuals expr_26 = this._agentVisuals;

            if (expr_26 != null)
            {
                expr_26.Reset();
            }
            this._agentVisuals = null;
            TableauView expr_3E = this.View;

            if (expr_3E != null)
            {
                expr_3E.AddClearTask();
            }
            this.Texture = null;
            if (this._tableauScene != null)
            {
                MBAgentRendererSceneController.DestructAgentRendererSceneController(this._tableauScene, this._agentRendererSceneController);
                this._agentRendererSceneController = null;
                this._tableauScene = null;
            }
        }