Exemple #1
0
 public Ball(ContentManager content, Paddle p)
 {
     ballText = content.Load<Texture2D>(@"images/Game/Ball");
     ballRect = new Rectangle(720, 150, 15, 15);
      _content = content;
      Paddle = p;
      this.state = new BallStart(this, this.Paddle);
      XSpeed = 0;
      Direction = 1;
 }
Exemple #2
0
 //Settings
 //ConstructorMovables
 public Game(ContentManager content)
 {
     arial = content.Load<SpriteFont>(@"arial");
        gamebg = content.Load<Texture2D>(@"images/Backgrounds/GameBG");
      StopGame = content.Load<Texture2D>(@"images/Buttons/StopGame");
      paddle = new Paddle(content);
      ball = new Ball(content, paddle);
      Tet = new Tetris(content, paddle, ball);
      StopGameRect = new Rectangle(1100, 650, StopGame.Width, StopGame.Height);
      _content = content;
 }
Exemple #3
0
 public Tetris(ContentManager c, Paddle p, Ball b)
 {
     BlocksArray = new string[]{ "BackLForm", "BackZForm", "IForm",  "SquareForm", "TForm", "ZForm", "LForm"};
     content = c;
     this.BlocksList = new List<Blocks>();
     blocks = new Blocks(content, "BackZForm", Color.White, this, b);
     ball = b;
     paddle = p;
     this.arial = content.Load<SpriteFont>("arialscore");
     rand = new Random();
     this.TetDone = false;
     this.OldBlockList = new List<OldBlocks>();
 }
Exemple #4
0
 public PaddleDown(Paddle p)
 {
     this.paddle = p;
 }
 public PaddleNoMovement(Paddle p)
 {
     this.paddle = p;
 }
Exemple #6
0
 public BallStart(Ball b, Paddle p)
 {
     this.Ball = b;
     this.Paddle = p;
 }
Exemple #7
0
 public PaddleUp(Paddle p)
 {
     this.paddle = p;
 }