public void Add(FallingObject fallingObject) { foreach (Pixel pixel in fallingObject.Body) { this.body.Add(pixel); levelElementsCount[pixel.Coordinate.Y]++; } }
public Field(FallingObject fallingObject, FallingObject nextFallingObject) { this.FallingObject = fallingObject; this.TopLeftPlayGround = new Point2D(4, 5); this.BottomRightPlayGround = new Point2D(Game.Width - 20, Game.Height - 5); this.Earth = new Earth(this.TopLeftPlayGround, this.BottomRightPlayGround); this.Border = new Border(this); this.NextFallingObject = new NextFallingObject(this, this.FallingObject); this.ControlsInfo = new ControlsInfo(this); this.Score = new Score(this); this.Clock = new Clock(this); }
public NextFallingObject(Field field, FallingObject fallingObject) { this.FallingObject = fallingObject; this.x = field.BottomRightPlayGround.X; this.y = field.TopLeftPlayGround.Y; }