public void removeSceneComponent(Scenes.SceneComponent sc) { AI.IAIEntity ai = sc as AI.IAIEntity; if (ai != null) { objectList.Remove(ai); heroPositionListners.removeMessageProcessor(ai); } Levels.Characters.Hero h = sc as Levels.Characters.Hero; if (h != null) { hero = null; } }
public void addSceneComponent(Scenes.SceneComponent sc) { AI.IAIEntity ai = sc as AI.IAIEntity; if (ai != null) { objectList.Add(ai); heroPositionListners.addMessageProcessor(ai); } Levels.Characters.Hero h = sc as Levels.Characters.Hero; if (h != null) { hero = h; } }