public void SetPosition(int x, int y, string direction) { Crashed = false; _formPositionX = PositionConvert.GridToFormX(x); _formPositionY = PositionConvert.GridToFormY(y); Facing = direction; UpdatePosition(); parentForm.Controls.Add(pbxBot); pbxBot.BringToFront(); }
public Wall(int x, int y, Form form) { GridPositionX = x; GridPositionY = y; pbxWall.Image = _wall; pbxWall.Visible = true; pbxWall.Location = new Point(PositionConvert.GridToFormX(x), PositionConvert.GridToFormY(y)); pbxWall.Size = new Size(30, 30); form.Controls.Add(pbxWall); pbxWall.BringToFront(); }
public Exit(int x, int y, Form thisLevel, Form nextLevel) { ThisLevel = thisLevel; NextLevel = nextLevel; GridPositionX = x; GridPositionY = y; pbxExit.Image = _exit; pbxExit.Visible = true; pbxExit.Location = new Point(PositionConvert.GridToFormX(x), PositionConvert.GridToFormY(y)); pbxExit.Size = new Size(30, 30); thisLevel.Controls.Add(pbxExit); pbxExit.BringToFront(); }