private void Initialize()
        {
            _graphic = new BeadGraphic();

            _requiredComponents = new List<Component>();
            _requiredComponents.Add(_inventoryItem);
            _requiredComponents.Add(_graphic);
        }
 private void Initialize()
 {
     _graphic = new BeadGraphic(Color.Black, Color.Black, 4);
     _requiredComponents = new List<Component>();
     _requiredComponents.Add(_graphic);
     _requiredComponents.Add(new Window());
     // TODO: Fix this
     _requiredComponents.Add(new InventoryItem(0));
 }
        private void Initialize()
        {
            _positions = new MultiplePositions();
            _graphic = new BeadGraphic();
            _window = new Window(Color.Black);
            _freeSpots = new List<GridPoint>();

            _requiredComponents = new List<Component>();
            _requiredComponents.Add(_positions);
            _requiredComponents.Add(_graphic);
            _requiredComponents.Add(_window);
        }
        public void DrawBeadGraphic(int x, int y, BeadGraphic beadGraphic)
        {
            PS.BeadColor(x, y, beadGraphic.Color);
            PS.BeadAlpha(x, y, Convert.ToInt32(beadGraphic.Alpha * 100));
            PS.BeadShow(x, y, beadGraphic.Show);

            PS.BeadBorderColor(x, y, beadGraphic.BorderColor);
            PS.BeadBorderWidth(x, y, beadGraphic.BorderWidth);
            PS.BeadBorderAlpha(x, y, beadGraphic.BorderAlpha);

            PS.BeadGlyph(x, y, beadGraphic.Glyph);
            PS.BeadGlyphColor(x, y, beadGraphic.GlyphColor);

            PS.BeadFlash(x, y, beadGraphic.Flash);
            PS.BeadFlashColor(x, y, beadGraphic.FlashColor);
        }
        /// <summary>
        /// Any game initialization logic goes here.
        /// </summary>
        public override void Init()
        {
            Singleton<GameState>.Instance.Initialize(32, 32);
            PS.GridBGColor(Color.Black);
            PS.StatusColor(Color.White);

            PS.GridSize(GameState.GridHeight, GameState.GridWidth);

            //new Entity("Glow", new LightSource(20, new Color(255, 255, 150), 1.0), 7, 7);
            //new Entity("Glow", new LightSource(20, new Color(255, 150, 255), 1.0), 23, 23);
            //new Entity("Glow", new LightSource(20, new Color(150, 255, 255), 1.0), 7, 23);
            //new Entity("Glow", new LightSource(20, new Color(255, 200, 200), 1.0), 23, 7);

            var playerGraphic = new BeadGraphic(new Color(200, 100, 100), new Color(100, 50, 50), 2);
            playerGraphic.Glyph = ' ';
            var playerComps = new List<Component> { playerGraphic, new Mob(), new Obstacle(), new Position(15, 15) };
            var player = new Entity("Player", playerComps);
            Singleton<GameState>.Instance.SetPlayer(player);
            GameState.DrawMap();
        }
        private void Initialize()
        {
            _optionalComponents = new List<Component>();
            _requiredComponents = new List<Component>();

            _graphic = new BeadGraphic();
            _position = new Position();
            _button = new MenuButton();
            _buttonGraphic = new ButtonGraphic(_graphic);
            _requiredComponents.Add(_graphic);
            _requiredComponents.Add(_buttonGraphic);
            _requiredComponents.Add(_position);
            _requiredComponents.Add(_button);
        }
 public static void Start(string name, ButtonType type, BeadGraphic baseGraphic, Color pressedColor, Action<bool> callback)
 {
     Singleton<ButtonBuilder>.Instance.StartButton(name, type, baseGraphic, pressedColor, callback);
 }
        private void StartButton(string name, ButtonType type, BeadGraphic baseGraphic, Color pressedColor, Action<bool> callback)
        {
            Initialize();
            _name = name;
            _graphic = baseGraphic;
            _button.Callback = callback;
            _button.Type = type;

            _buttonGraphic = new ButtonGraphic(baseGraphic, pressedColor);

            switch (type)
            {
                case (ButtonType.Build):
                    _position.Coords = GetBuildCoords();
                    break;
            }
        }
 private void StartInventory(string name, BeadGraphic graphic)
 {
     _name = name;
     _graphic = graphic;
 }
 public static void Start(string name, BeadGraphic graphic)
 {
     Singleton<InventoryEntryBuilder>.Instance.StartInventory(name, graphic);
 }
        private void Initialize()
        {
            _requiredComponents = new List<Component>();
            _optionalComponents = new List<Component>();
            _graphic = new BeadGraphic(Color.Black);
            _tile = new Tile("");

            _requiredComponents.Add(_graphic);
            _requiredComponents.Add(_tile);
            _requiredComponents.Add(new MultiplePositions());
        }
 public override void Initialize()
 {
     var bgGraphic = new BeadGraphic(Color.Black);
     var bgPositions = new MultiplePositions();
     for (var i = 0; i < _width; i++)
     {
         for (var j = 0; j < _height; j++)
         {
             bgPositions.AddPosition(_start.X + i, _start.Y + j);
         }
     }
     var bg = new Window();
     var bgComps = new List<Component> { bgPositions, bgGraphic, bg };
     new Entity("Menu Background", bgComps);
 }
 private BeadGraphic CounterGraphic(char num, Color glyphColor, Color bgColor)
 {
     var graphic = new BeadGraphic(bgColor);
     graphic.GlyphColor = glyphColor;
     graphic.Glyph = num;
     return graphic;
 }
 public static void DrawBeadGraphic(int x, int y, BeadGraphic graphic)
 {
     Singleton<DrawSystem>.Instance.DrawBeadGraphic(x, y, graphic);
 }
 /// <summary>
 /// Adds a graphic to the window
 /// </summary>
 /// <param name="graphic">Graphic to be added</param>
 /// <param name="x">Horizontal offset relative to drawable space inside of window (starts inside buffer)</param>
 /// <param name="y">Vertical offset as above</param>
 private void AddGraphic(BeadGraphic graphic, int x = 0, int y = 0)
 {
     var pos = new RelativePosition(_position, x, y);
     new Entity(_name, new Component[] { pos, _graphic });
     // TODO: add a case for figuring out the next available spot if x and y are taken
 }