//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; }
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>(); }
//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); }
public Move30PercentUp(Ball b) { this.Ball = b; }
public BallStart(Ball b, Paddle p) { this.Ball = b; this.Paddle = p; }