Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 public static SwitchModel BuildSwitch(Pointf switchPosition, ref MapModel map)
 {
     SwitchModel toAdd = new SwitchModel(map.Game, switchPosition);
     map.AddComponent(toAdd);
     return toAdd;
 }
Ejemplo n.º 3
0
 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;
 }
Ejemplo n.º 4
0
 public static Collectable BuildCollectable(Pointf position, ref MapModel map, int points)
 {
     Collectable c = new Collectable(map.Game, position, points);
     map.AddComponent(c);
     return c;
 }
Ejemplo n.º 5
0
 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;
 }
Ejemplo n.º 6
0
 public static MoveableBox BuildMoveableBox(Pointf boxPosition, Size boxSize, ref MapModel map)
 {
     MoveableBox box = new MoveableBox(map.Game, boxPosition, boxSize);
     map.AddComponent(box);
     return box;
 }
Ejemplo n.º 7
0
        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);
        }
Ejemplo n.º 8
0
 public static ExitDoorModel BuildExitDoor(Pointf doorPosition, PlayerIndex playerIndex, ref MapModel map)
 {
     ExitDoorModel exit = new ExitDoorModel(map.Game, doorPosition, playerIndex);
     map.AddComponent(exit);
     return exit;
 }