public Bird(Game game, TubeGenerator generator) { this.game = game; this.generator = generator; var sheetTex = game.Content.Load<Texture2D> ("flappymascot_char.png", TextureConfiguration.Nearest); sheet = new SpriteSheet2D (sheetTex, 4, 1); animator = new Animator (sheet, 4); animator.DurationInMilliseconds = 500; animator.Position.X = game.Resolution.Width * 0.25f; ypos = (game.Resolution.Height / 2) + (sheet [0].Height / 2); }
public Bird(Game game, TubeGenerator generator) { this.game = game; this.generator = generator; var sheetTex = game.Content.Load <Texture2D> ("flappymascot_char.png", TextureConfiguration.Nearest); sheet = new SpriteSheet2D(sheetTex, 4, 1); animator = new Animator(sheet, 4); animator.DurationInMilliseconds = 500; animator.Position.X = game.Resolution.Width * 0.25f; ypos = (game.Resolution.Height / 2) + (sheet [0].Height / 2); }
public GameScene() : base("maingame") { game = UIController.Instance.Game; generator = new TubeGenerator (game); bird = new Bird (game, generator); lblScore = new Label (150, 20, "Roboto Regular") { X = 25, Y = game.Resolution.Height - 45, FontSize = 18f, Text = "Score: 0" }; backgroundLeft = 0f; blueTint = 0f; texMap = game.Content.Load<Texture2D> ("flappymascot_map_new.png"); Controls.Add (lblScore); }
public GameScene() : base("maingame") { game = UIController.Instance.Game; generator = new TubeGenerator(game); bird = new Bird(game, generator); lblScore = new Label(150, 20, "Roboto Regular") { X = 25, Y = game.Resolution.Height - 45, FontSize = 18f, Text = "Score: 0" }; backgroundLeft = 0f; blueTint = 0f; texMap = game.Content.Load <Texture2D> ("flappymascot_map_new.png"); Controls.Add(lblScore); }