using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input.Touch; using Penguloon.Scenes; namespace Penguloon.Levels { public abstract class LevelBase { public SceneBase ParentScene { get; set; } public Texture2D SplashArt { get; set; } public Map Map { get; set; } public int Health { get; set; } public int Money { get; set; } = 0; public int ID { get; set; } public int Kills { get; set; } = 0; public bool Finished { get; set; } = false; public LevelBase() { } public abstract void CreateMap(); public virtual void Initialize(SceneBase sceneBase) { this.ParentScene = sceneBase; CreateMap(); } public void Draw(float deltaTime) { Map.Draw(deltaTime); DrawUnique(deltaTime); } public void Update(float deltaTime, TouchLocation[] touchLocations) { Map.Update(deltaTime); if(Health <= 0) { Finished = true; } UpdateUnique(deltaTime, touchLocations); } public virtual void DrawUnique(float deltaTime) { } public virtual void UpdateUnique(float deltaTime, TouchLocation[] touchLocations) { } } }