/* * Loads the specified level */ public void LoadLevel(ContentFactory factory, GameUnitController unit_controller, ItemController item_controller, int level_num) { CurLevel = factory.loadLevel(level_num); item_controller.Reset(); unit_controller.Reset(); unit_controller.SetLevel(CurLevel); }
public GameUnitController(ContentFactory factory) { this.factory = factory; Units = new List<GameUnit>(); DeadUnits = new List<GameUnit>(); ConvertedUnits = new List<GameUnit>(); lostUnits = new List<GameUnit>(); rand = new Random(); Player = factory.createPlayer(new Vector2(0, 0)); }
/* * Reloads the current level */ public void ResetLevel(ContentFactory factory, GameUnitController unit_controller, ItemController item_controller) { LoadLevel(factory, unit_controller, item_controller, CurLevelNum); }
/// <summary> /// Load all default graphics resources for the canvas /// </summary> /// <param name='content'> /// Reference to global content manager. /// </param> public void LoadContent(ContentFactory factory) { // Load sprite font font = factory.getFont(); }
public GameEngine() { canvas = new GameCanvas(this); factory = new ContentFactory(new ContentManager(Services)); camera = new Camera(canvas.Width, canvas.Height); }