public void Initialize(Game game) { // We've already initialized!! if (this.player != null) { // But we need to re-initialise the info panel, as it is unloaded on game-load. // The GameInfoDisplayPanel needs a player, so please leave the 2 seperate calls in this function this.gameInfoPanel = new GameInfoDisplayPanel(0.8f); this.player.TeleportTo(this.player.moveTarget); return; } this.game = game; this.player = new Player(); this.gameInfoPanel = new GameInfoDisplayPanel(0.8f); this.backgroundMap = new BackgroundMap(); StateManager.GetInstance().SetState(StateManager.State.Running); }
public void Initialize(Game game) { this.game = game; this.player = new Player(); }