Ejemplo n.º 1
0
        public BattleWorld(IHeroesService heroesService, GraphicResources graphicResources)
        {
            _heroesService = heroesService;
            _content = graphicResources.Content;
            _entityWorld = new EntityWorld();
            var systemManager = _entityWorld.SystemManager;
            EntityCreator entityCreator = new EntityCreator(_entityWorld);
            BattleEngine.EntityCreator = entityCreator;
            _fighterManager = new FighterManager(_entityWorld);
            EntitySystem.BlackBoard.SetEntry("Resources", graphicResources);

            systemManager.SetSystem(new CharacterPlacingSystem(graphicResources), GameLoopType.Update, 0);
            systemManager.SetSystem(new EffectManagerSystem(), GameLoopType.Update, 0);
            systemManager.SetSystem(new MovingSystem(), GameLoopType.Update, 1);
            systemManager.SetSystem(new ActingSystem(), GameLoopType.Update, 3);
            systemManager.SetSystem(new AISkillSelectionSystem(_fighterManager), GameLoopType.Update, 4);
            systemManager.SetSystem(new ExpirationSystem(), GameLoopType.Update, 5);
            systemManager.SetSystem(new InputSkillSelectionSystem(_fighterManager, graphicResources), GameLoopType.Update, 5);
            systemManager.SetSystem(new AnimationSystem(entityCreator), GameLoopType.Update, 5);
            systemManager.SetSystem(new ParticleGeneratorSystem(), GameLoopType.Update, 5);

            systemManager.SetSystem(new ImageRenderingSystem(graphicResources), GameLoopType.Draw, 0);
            systemManager.SetSystem(new CharacterInfoRenderingSystem(graphicResources), GameLoopType.Draw, 1);
            systemManager.SetSystem(new ParticleRenderingSystem(graphicResources), GameLoopType.Draw, 1);
            systemManager.SetSystem(new ColoredTextRenderingSystem(graphicResources), GameLoopType.Draw, 2);
            systemManager.SetSystem(new InputSkillSelectionRenderingSystem(graphicResources), GameLoopType.Draw, 2);
        }
Ejemplo n.º 2
0
 public AISkillSelectionSystem(FighterManager fighterManager)
     : base(typeof(Acting), typeof(Group), typeof(AIControlled))
 {
     _fighterManager = fighterManager;
 }