Example #1
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;
 }
Example #2
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>();
 }
Example #3
0
        //Constructor
        public Blocks(ContentManager c, string ImageName, Color kleur, Tetris tet, Ball b)
        {
            this.content = c;
            this.blockText = content.Load<Texture2D>(@"images/Game/Tetris/" + ImageName + "/Up");
            this.blockRect = new Rectangle(150, 0, blockText.Width, blockText.Height);
            this.IName = ImageName;
            this.kleur = kleur;
            this.Side = 1;
            this.TextSide = "Up";
            this.Speed = 1;
            this.arial = content.Load<SpriteFont>("arial");
            this.tetris = tet;
            this.ball = b;

            BlockTextureData = new Color[this.blockText.Width * this.blockText.Height];
            this.blockText.GetData(BlockTextureData);
        }
Example #4
0
 public Move30PercentUp(Ball b)
 {
     this.Ball = b;
 }
Example #5
0
 public BallStart(Ball b, Paddle p)
 {
     this.Ball = b;
     this.Paddle = p;
 }