public FourPlayerState(ContentManager Content) { player1 = new Paddle(Content.Load<Texture2D>("rodeSpeler"), Content.Load<Texture2D>("balRood"), new Vector2(0, 400), 350, Keys.W, Keys.S, true, "Player 1"); player2 = new Paddle(Content.Load<Texture2D>("blauweSpeler"), Content.Load<Texture2D>("balBlauw"), new Vector2(Practicum1.Screen.X - 16, 400), 350, Keys.Up, Keys.Down, true, "Player 2"); player3 = new Paddle(Content.Load<Texture2D>("geleSpeler"), Content.Load<Texture2D>("balGeel"), new Vector2(400, 0), 350, Keys.U, Keys.I, false, "Player 3"); player4 = new Paddle(Content.Load<Texture2D>("groeneSpeler"), Content.Load<Texture2D>("balGroen"), new Vector2(400, Practicum1.Screen.Y - 16), 350, Keys.V, Keys.B, false, "Player 4"); paddleList.Add(player1); paddleList.Add(player2); paddleList.Add(player3); paddleList.Add(player4); ball = new Ball(Content.Load<Texture2D>("bal"), new Vector2(Practicum1.Screen.X / 2, Practicum1.Screen.Y / 2), 275, paddleList, "Ball"); powerUp1 = new PowerUp(null, new Vector2(0, 0), Content, "Powerup 1"); powerUp2 = new PowerUp(null, new Vector2(0, 0), Content, "Powerup 2"); powerUpList.Add(powerUp1); powerUpList.Add(powerUp2); pausedText = new TextObject("Game paused.", new Vector2(Practicum1.Screen.X / 2 - 80, Practicum1.Screen.Y / 2), Color.Black, null, "Pause Text"); pausedText.Visible = false; this.Add(player1); this.Add(player2); this.Add(player3); this.Add(player4); this.Add(ball); this.Add(powerUp1); this.Add(powerUp2); this.Add(pausedText); }
public AIPlayerState(ContentManager Content) { player1 = new Paddle(Content.Load<Texture2D>("rodeSpeler"), Content.Load<Texture2D>("balRood"), new Vector2(0, 300), 350, Keys.W, Keys.S, true, "Player 1"); player2 = new PaddleAI(Content.Load<Texture2D>("blauweSpeler"), Content.Load<Texture2D>("balBlauw"), new Vector2(Practicum1.Screen.X - 15, 300), 350, true, "Player 2"); paddleList.Add(player1); paddleList.Add(player2); ball = new Ball(Content.Load<Texture2D>("bal"), new Vector2(Practicum1.Screen.X / 2, Practicum1.Screen.Y / 2), 275, paddleList, "Ball"); this.Add(player1); this.Add(player2); this.Add(ball); player2.Ball = ball; }
public TrollState(ContentManager Content) { player1 = new Paddle(Content.Load<Texture2D>("rodeSpeler"), Content.Load<Texture2D>("balRood"), new Vector2(0, 300), 350, Keys.W, Keys.S, true, "Player 1"); player2 = new Paddle(Content.Load<Texture2D>("blauweSpeler"), Content.Load<Texture2D>("balBlauw"), new Vector2(Practicum1.Screen.X - 15, 300), 350, Keys.Up, Keys.Down, true, "Player 2"); paddleList.Add(player1); paddleList.Add(player2); for (int i = 0; i < 100; ++i) { ballarray[i] = new Ball(Content.Load<Texture2D>("bal"), new Vector2(Practicum1.Screen.X / 2 + 5 * i, Practicum1.Screen.Y / 2 + 5 * i), 275, paddleList, "Ball" + i); this.Add(ballarray[i]); } this.Add(player1); this.Add(player2); }