//public override Size Size { get { return new Size(_width, _height); } } #endregion Public members public Tile(int x, int y, TileType typeInt, LevelElements elements, Texture2D image, GameScreen gameScreen) : base(gameScreen) { this.X = x * 40; this.Y = y * 40; this.TileType = typeInt; this._elements = elements; this.IsVisible = true; this.Rectangle = new Rectangle((int)this.X, (int)this.Y, this._width, this._height); this._image = image; switch (this.TileType) { case TileType.ExitSign: this._height = 80; this._width = 80; break; case TileType.HillLarge: this._height = 120; break; case TileType.HillSmall: this._height = 80; break; default: break; } }
//public override Size Size { get { return new Size(this._width, this._height); } } #endregion Public members public Coin(int x, int y, int value, LevelElements elements, GameScreen gameScreen) : base(gameScreen) { this.X = x * 40; this.Y = y * 40; this.Value = value; this._elements = elements; this.IsVisible = true; this._rectangle = new Rectangle(); switch (value) { case 1: this._animation = ImagesAndAnimations.Instance.BronzeCoinAnimation; break; case 2: this._animation = ImagesAndAnimations.Instance.SilverCoinAnimation; break; case 3: this._animation = ImagesAndAnimations.Instance.GoldCoinAnimation; break; default: this._animation = ImagesAndAnimations.Instance.BronzeCoinAnimation; break; } }