public static ElevatorModel BuildElevator(Pointf elevatorPosition, float elevatorWidth, float maxMovementHeight, ref MapModel map) { ElevatorModel elev = new ElevatorModel(map.Game, elevatorWidth, maxMovementHeight, elevatorPosition); map.AddComponent(elev); return elev; }
public static SwitchModel BuildSwitch(Pointf switchPosition, ref MapModel map) { SwitchModel toAdd = new SwitchModel(map.Game, switchPosition); map.AddComponent(toAdd); return toAdd; }
public static Wall BuildWall(Pointf wallPosition, Size wallSize, Wall.Colors wallColor, ref MapModel map) { Wall wall = new Wall(map.Game, new Pointf(wallPosition.X, wallPosition.Y), new Size(wallSize.Width, wallSize.Height), wallColor); map.AddComponent(wall); return wall; }
public static Collectable BuildCollectable(Pointf position, ref MapModel map, int points) { Collectable c = new Collectable(map.Game, position, points); map.AddComponent(c); return c; }
public static Resistor BuildResistor(Pointf position, Resistor.Type index, ref MapModel map) { Resistor res = new Resistor(map.Game, position, index); map.AddComponent(res); return res; }
public static MoveableBox BuildMoveableBox(Pointf boxPosition, Size boxSize, ref MapModel map) { MoveableBox box = new MoveableBox(map.Game, boxPosition, boxSize); map.AddComponent(box); return box; }
public static void BuildMapBorders(ref MapModel map) { // top wall Wall wall = new Wall(map.Game, new Pointf(0, 0), new Size(map.mSize.Width, OFFSET), Wall.Colors.WHITE); map.AddComponent(wall); // left wall wall = new Wall(map.Game, new Pointf(0, 0), new Size(OFFSET, map.mSize.Height), Wall.Colors.WHITE); map.AddComponent(wall); // bottom wall wall = new Wall(map.Game, new Pointf(0, map.mSize.Height - OFFSET), new Size(map.mSize.Width, OFFSET), Wall.Colors.WHITE); map.AddComponent(wall); // right wall wall = new Wall(map.Game, new Pointf(map.mSize.Width - OFFSET, 0), new Size(OFFSET, map.mSize.Height), Wall.Colors.WHITE); map.AddComponent(wall); }
public static ExitDoorModel BuildExitDoor(Pointf doorPosition, PlayerIndex playerIndex, ref MapModel map) { ExitDoorModel exit = new ExitDoorModel(map.Game, doorPosition, playerIndex); map.AddComponent(exit); return exit; }