public override void Initialize(IApplication application) { base.Initialize(application); // Load storage game data GameStorage gameStorage; if (WaveServices.Storage.Exists<GameStorage>()) { gameStorage = WaveServices.Storage.Read<GameStorage>(); } else { gameStorage = new GameStorage(); } Catalog.RegisterItem(gameStorage); ScreenContext screenContext = new ScreenContext(new GamePlayScene()); WaveServices.ScreenContextManager.To(screenContext); }
public override void Initialize(IApplication application) { base.Initialize(application); // Load storage game data GameStorage gameStorage; if (WaveServices.Storage.Exists<GameStorage>()) { gameStorage = WaveServices.Storage.Read<GameStorage>(); } else { gameStorage = new GameStorage(); } Catalog.RegisterItem(gameStorage); ViewportManager vm = WaveServices.ViewportManager; vm.Activate(1024, 768, ViewportManager.StretchMode.Uniform); ScreenContext screenContext = new ScreenContext(new GamePlayScene()); WaveServices.ScreenContextManager.To(screenContext); }