public DrawTileRectangleStatus(SceneEditGameWorld s) : base(s) { selector = new SpriteRectangle() { color = Color.White, boundSize = 1, }; }
public DrawTileRectangleStatus(DefaultStatus s) : base(s) { selector = new SpriteRectangle() { color = Color.White, boundSize = 1, }; }
protected void refreshBuffer() { background = new SpriteRectangle() { color = Color.Black, isFill = true, size = ClientSize }; bufferGraphic = new BufferedGraphicsContext().Allocate(CreateGraphics(), DisplayRectangle); gameGraphic.g = bufferGraphic.Graphics; }
private void LoadLevel(int v) { DoorList.Clear(); SwitchList.Clear(); foodList.Clear(); currentExit = null; rectList.Clear(); //v = 5; Level nl = levelsList[v]; player._Position = nl.SpawnPoint; player.SetPlayerSize(4); currentExit = new ExitPoint(); currentExit._Position = nl.ExitPoint; currentExit.LoadContent(@"Art/Exit", Content); foreach (DoorInfo di in nl.DoorList) { Door nd = new Door(); nd.myRect = new Rectangle((int)di.pos.X, (int)di.pos.Y, di.width, di.height); nd.ChangeColor(di.color); nd.LoadContent(@"Art/Door", Content); DoorList.Add(nd); } foreach (WallInfo di in nl.WallList) { SpriteRectangle nd = new SpriteRectangle(); nd.myRect = new Rectangle((int)di.pos.X, (int)di.pos.Y, di.width, di.height); //nd.currentColor = di.color; //nd.LoadContent(@"Art/Door", Content); rectList.Add(nd); } foreach (SwitchInfo si in nl.SwitchList) { Switch ns = new Switch(); ns.LoadContent(@"Art/Switch", Content); ns.ChangeColor(si.color); ns._Position = si.pos; SwitchList.Add(ns); } foreach (FoodInfo fi in nl.FoodList) { CreateFood(fi.goodFood, fi.pos); } }
public TileMapSprites(GameSystem gs, GameWorldSystem gw, MapSpritesInfo msi, bool isEditor = false) : base(gs, gw, isEditor) { mapSpritesInfo = msi; tileSprite = new AutoTileSprite(tileWidth, tileHeight); int size = 4; selector = new SpriteRectangle() { color = Color.White, boundSize = size, size = new Size(tileWidth - size, tileHeight - size) }; resize(); }
public UIPlayerInfoPanel(GameSystem gs, GameWorldSystem gw, Point position) { gameSystem = gs; gameWorld = gw; var g = gs.gameGraphic; background = new SpriteRectangle() { position = position, color = Color.FromArgb(64, Color.Black), size = new Size(450, 36), isFill = true }; stName = new SpriteText() { position = new Point(position.X + 16, position.Y + 8), color = Color.White, font = g.getDefaultFont(), fontSize = g.defaultFontSize, text = nameof(stName) }; stForce = new SpriteText() { position = new Point(position.X + 144, position.Y + 8), color = Color.White, font = g.getDefaultFont(), fontSize = g.defaultFontSize, text = nameof(stForce) }; stHp = new SpriteText() { position = new Point(position.X + 272, position.Y + 8), color = Color.White, font = g.getDefaultFont(), fontSize = g.defaultFontSize, text = nameof(stHp) }; }
public UITileInfoPanel(GameSystem gs, Point position) { gameSystem = gs; var g = gs.gameGraphic; background = new SpriteRectangle() { position = position, color = Color.FromArgb(64, Color.Black), size = new Size(450, 36), isFill = true }; tileName1 = new SpriteText() { position = new Point(position.X + 16, position.Y + 8), color = Color.White, font = g.getDefaultFont(), fontSize = g.defaultFontSize, text = nameof(tileName1) }; tileName2 = new SpriteText() { position = new Point(position.X + 144, position.Y + 8), color = Color.White, font = g.getDefaultFont(), fontSize = g.defaultFontSize, text = nameof(tileName2) }; tileName3 = new SpriteText() { position = new Point(position.X + 272, position.Y + 8), color = Color.White, font = g.getDefaultFont(), fontSize = g.defaultFontSize, text = nameof(tileName3) }; }