/// <summary> /// Creates the Pong from the class. /// </summary> /// <param name="position">The position of the pong</param> public Pong(Texture2D texture, Vector2 position, Color color, myFirstXNAGame myGame) : base(position) { AddAnimations(texture); speed = 3; this.myGame = myGame; this.color = color; direction.X = (2 * (float)myGame.rng.NextDouble() - 1); direction.Y = (2 * (float)myGame.rng.NextDouble() - 1); }
public PaddleLeft(Texture2D texture, Vector2 position, Color color, myFirstXNAGame myGame, Keys up, Keys down) : base(position) { AddAnimations(texture); if (up == Keys.None && up == Keys.None) { ai = true; } else { ai = false; } speed = 3; direction = Vector2.Zero; this.up = up; this.down = down; this.position = position; this.myGame = myGame; this.color = color; }