public void Execute() { if (UnityEngine.Input.GetKeyDown(KeyCode.R)) { SceneSetup.LoadScene("Editor"); } }
public void Execute() { if (UnityEngine.Input.GetKeyDown(KeyCode.Escape)) { SceneSetup.LoadScene("MainMenu"); } }
public void Execute(List <Entity> entities) { if (entities.Any(x => x.hasActingSequences)) { return; } SceneSetup.LoadScene("Editor"); }
public void Execute(List <Entity> entities) { var hero = entities.SingleEntity(); var levelExits = _levelExitsGroup.GetEntities(); if (levelExits.Any(x => x.position.Value == hero.position.Value)) { try { // TODO: FIX SO THAT NEXT LEVEL IS LOADED! SceneSetup.LoadScene("Play"); } catch (Exception) { SceneManager.LoadScene("gameover"); } } }
public void Start() { SceneSetup.CurrentScene = "MainMenu"; SceneSetup.OnSceneChanging += OnSceneChanging; var canvas = GameObject.Find("Canvas"); _uiPool = Pools.ui; _systems = SceneSetup.CreateSystem().Add <ReloadSystem>() .Add(_uiPool.CreateSystem <AddOrRemoveViewSystem>()) .Add(_uiPool.CreateSystem <ConnectMenuItemToParentSystem>()) .Add(_uiPool.CreateSystem <CursorClickMenuItemSystem>()) .Add(_uiPool.CreateSystem <SelectedItemAnimationSystem>()) .Add(_uiPool.CreateSystem <DestroySystem>()); _uiPool.CreateMenuItems(canvas, new Tuple <string, Action>("New Game", () => SceneSetup.LoadScene("Play")), new Tuple <string, Action>("Editor", () => SceneSetup.LoadScene("Editor"))); _systems.Initialize(); }
public void LoadScene() { SceneSetup.LoadScene("MainMenu"); }