GameFramework.Scene.LoadObjects C# (CSharp) Method

LoadObjects() private method

private LoadObjects ( ) : void
return void
        private void LoadObjects()
        {
            LogSys.Log(LOG_TYPE.DEBUG, "Scene {0} start Running.", m_SceneResId);
            m_GameTime.Start();
            m_SceneContext.StartTime = m_GameTime.StartTime;

            for (int campId = (int)CampIdEnum.Friendly; campId <= (int)CampIdEnum.Red; ++campId) {
                int key = this.SceneResId * 10 + campId;
                List<TableConfig.LevelMonster> monsters;
                if (TableConfig.LevelMonsterProvider.Instance.TryGetValue(key, out monsters)) {
                    for (int i = 0; i < monsters.Count; ++i) {
                        TableConfig.LevelMonster monster = monsters[i];
                        if (null != monster) {
                            TableConfig.Actor actor = TableConfig.ActorProvider.Instance.GetActor(monster.actorID);
                            if (null != actor) {
                                int unitId = campId * 10000 + i;
                                EntityInfo npc = EntityManager.AddEntity(unitId, campId, actor, (int)AiStateLogicId.Entity_General);
                                if (null != npc) {
                                    npc.IsPassive = monster.passive;
                                    npc.LevelMonsterData = monster;
                                    npc.SetLevel(monster.level);
                                    npc.GetMovementStateInfo().SetPosition2D(monster.x, monster.y);
                                    npc.GetMovementStateInfo().SetFaceDir(Geometry.DegreeToRadian(monster.dir));
                                }
                            }
                        }
                    }
                }
            }

            ServerStorySystem.ThreadInitMask();
            m_StorySystem.ClearStoryInstancePool();
            m_StorySystem.PreloadSceneStories();
            m_StorySystem.StartStory("local_main");
            m_StorySystem.StartStory("story_main");
        }