public TwoPlayerBaseGame(DataClasses.GameConfiguration gameConfig) : base(gameConfig) { // load ship 1 SpriteObjects.Ship ship = gameConfig.Ship; player1BaseDamage = gameConfig.Ship.damage; player1BaseShield = gameConfig.Ship.sheilds; ship.ShipPosition = mMapLoader.shipStartPosP1; ship.World = base.mWorld; ship.ShipId = "1"; // load ship 2 SpriteObjects.Ship ship2 = gameConfig.Ship2; player2BaseDamage = gameConfig.Ship2.damage; player2BaseShield = gameConfig.Ship2.sheilds; ship2.ShipPosition = mMapLoader.shipStartPosP2; ship2.World = base.mWorld; ship2.ShipId = "2"; mPlayer1 = new ControllerAgents.LocalAgent(ship); mPlayer2 = new ControllerAgents.LocalAgent(ship2); cam = new CameraControls.TwoPlayerCamera(); _angle = 0.0f; initaliseHUD(); }
public SinglePlayer(DataClasses.GameConfiguration gameConfig) : base(gameConfig) { SpriteObjects.Ship ship = gameConfig.Ship; player1BaseDamage = gameConfig.Ship.damage; player1BaseShield = gameConfig.Ship.sheilds; ship.ShipPosition = mMapLoader.shipStartPosP1; ship.World = base.mWorld; ship.ShipId = "1"; SpriteObjects.Ship aIShip = gameConfig.Ship2; player2BaseDamage = gameConfig.Ship2.damage; player2BaseShield = gameConfig.Ship2.sheilds; aIShip.ShipPosition = mMapLoader.shipStartPosP2; aIShip.World = base.mWorld; aIShip.ShipId = "2"; powerups.Add("shield"); powerups.Add("Shotgun"); powerups.Add("Machinegun"); powerups.Add("Spiral"); powerups.Add("Emp"); powerups.Add("Net"); mPlayer1 = new ControllerAgents.LocalAgent(ship); mAI2 = new ControllerAgents.AIAgent(aIShip, base.mWorld); this.cam = new CameraControls.Camera(); initaliseHUD(); }
public GameScreen(DataClasses.GameConfiguration gameConfig) { mWorld = new World(new Vector2(0, 2)); mMapLoader = new Maps.MapLoader(gameConfig.MapName, mWorld); SpriteObjects.Ship ship = gameConfig.Ship; ship.ShipPosition = mMapLoader.shipStartPosP1; ship.World = mWorld; mPlayer1 = new ControllerAgents.LocalAgent(ship); _cameraZoom = new Vector3(0.5f, 0.5f, 0.5f); }