using System.Numerics; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using MLEM.Cameras; using MLEM.Extensions; using MLEM.Font; using MLEM.Startup; using ThemeParkClicker.Attractions; namespace ThemeParkClicker { public class GameImpl : MlemGame { public static GameImpl Instance { get; private set; } public BigInteger Tickets = 200; public ParkMap Map { get; private set; } public Camera Camera { get; private set; } public Ui Ui { get; private set; } public GameImpl() { Instance = this; } protected override void LoadContent() { base.LoadContent(); this.Ui = new Ui(this.UiSystem); this.Map = new ParkMap(10, 10); this.Camera = new Camera(this.GraphicsDevice) { Scale = 4, AutoScaleWithScreen = true }; this.Map.Place(Point.Zero, Attraction.Attractions["Carousel"]()); this.Map.Place(new Point(1, 0), Attraction.Attractions["Carousel"]()); this.Map.Place(new Point(3, 0), Attraction.Attractions["Carousel"]()); this.Map.Place(new Point(1,2), Attraction.Attractions["FoodCourt"]()); } public string DisplayTicketCount() { return this.Tickets.ToString(); } protected override void DoUpdate(GameTime gameTime) { base.DoUpdate(gameTime); this.Map.Update(gameTime); this.Ui.Update(gameTime); } protected override void DoDraw(GameTime gameTime) { this.GraphicsDevice.Clear(ColorExtensions.FromHex(0x86cfcb)); base.DoDraw(gameTime); } } }