Example #1
0
        public PlayerGameComponent addPlayer(PlayerIndex playerIndex, String imageName)
        {
            PlayerGameComponent playerGameComponent = new PlayerGameComponent(this, imageName, playerIndex);

            this.Components.Add(playerGameComponent);
            return(playerGameComponent);
        }
Example #2
0
 public EasyGameComponent AddPaddle()
 {
     paddle = this.AddPlayer(PlayerIndex.One, "paddle");
     paddle.AllowVerticalMovement = false;
     paddle.SetPosition(200, 775);
     paddle.Acceleration = 400;
     paddle.Mass = 50;
     paddle.BounceFactor = 1.1f;
     return paddle;
 }
 public PlayerGameComponent addPlayer(PlayerIndex playerIndex, String imageName)
 {
     PlayerGameComponent playerGameComponent = new PlayerGameComponent(this, imageName, playerIndex);
     this.Components.Add(playerGameComponent);
     return playerGameComponent;
 }