public InputSkillSelectionRenderingSystem(GraphicResources graphicResources)
     : base(typeof(InputControlled), typeof(Acting))
 {
     _spriteBatch = graphicResources.SpriteBatch;
     arrowTargeted = graphicResources.Content.Load<Texture2D>("Images/Arrow1");
     arrowCanBeTargeted = graphicResources.Content.Load<Texture2D>("Images/Arrow2");
 }
Beispiel #2
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);
        }
Beispiel #3
0
 public DialogWindow(string title, GraphicResources graphicsResources)
     : base(title, graphicsResources)
 {
     _titleLabel = new Label(graphicsResources.SpriteBatch, graphicsResources.Font(FontSize.Normal), title);
     _textLabel = new AdvancedLabel(graphicsResources.SpriteBatch, graphicsResources.Font(FontSize.Normal));
     Selected += This_Selected;
 }
Beispiel #4
0
 public AbstractMenu(string title, GraphicResources graphicsResources)
     : base(graphicsResources)
 {
     Title = title;
     Components = new List<IWidget>();
     HighlightedComponent = null;
 }
 public ImageRenderingSystem(GraphicResources graphics)
     : base(typeof(Image), typeof(Transform))
 {
     _spriteBatch = graphics.SpriteBatch;
     _windowRectangle = new Rectangle(0, 0, graphics.Window.Width, graphics.Window.Height);
     _viewRectangle = _windowRectangle;
 }
Beispiel #6
0
 public GUI(GraphicResources graphics)
 {
     Graphics = graphics;
     _drawables = new List<Drawable>();
     _menus = new Dictionary<string, IMenu>();
     _menuFocus = new Stack<string>();
 }
 public ColoredTextRenderingSystem(GraphicResources graphics)
     : base(typeof(Transform), typeof(ColoredText))
 {
     _spriteBatch = graphics.SpriteBatch;
     _windowRectangle = new Rectangle(0, 0, graphics.Window.Width, graphics.Window.Height);
     _viewRectangle = _windowRectangle;
     _font = graphics.Font(FontSize.Normal);
 }
 public ParticleRenderingSystem(GraphicResources graphics)
     : base(typeof(Transform), typeof(Particle))
 {
     _spriteBatch = graphics.SpriteBatch;
     _windowRectangle = new Rectangle(0, 0, graphics.Window.Width, graphics.Window.Height);
     _viewRectangle = _windowRectangle;
     _whiteTexture = new Texture2D(graphics.Device, 1, 1);
     _whiteTexture.SetData(new Color[] { Color.White });
 }
Beispiel #9
0
        public BattleState(IHeroesService heroesService, GraphicResources graphicResources)
        {
            _heroesService = heroesService;
            _graphicResources = graphicResources;

            _world = new BattleWorld(heroesService, graphicResources);
            _backgroundSprite = new Sprite(graphicResources.SpriteBatch);
            _backgroundSprite.Dimension = graphicResources.Window.Dimension;
            _backgroundSprite.Texture = _graphicResources.Content.Load<Texture2D>("Backgrounds\\Forêt");
        }
 public CharacterPlacingSystem(GraphicResources graphicResources)
     : base(typeof(Image), typeof(Transform), typeof(Group), typeof(BattleStats))
 {
     _contentManager = graphicResources.Content;
     _window = graphicResources.Window;
 }
Beispiel #11
0
 public BasicWindow(GraphicResources graphics)
     : base(graphics.SpriteBatch)
 {
     Graphics = graphics;
     BackGroundSprite = new Sprite(graphics.SpriteBatch, Graphics.Background);
 }
Beispiel #12
0
 public ListMenu(string title, GraphicResources graphicResources, FontSize fontSize)
     : base(title, graphicResources)
 {
     _titleLabel = new Label(graphicResources.SpriteBatch, graphicResources.Font(fontSize), title);
 }
Beispiel #13
0
 public LabelBox(GraphicResources graphicResources, FontSize fontSize = FontSize.Normal)
     : base(graphicResources)
 {
     _label = new Label(graphicResources.SpriteBatch, graphicResources.Font(fontSize));
 }
Beispiel #14
0
 public SkillMenu(string title, GraphicResources graphicResources)
     : base(title, graphicResources, FontSize.Normal)
 {
 }