예제 #1
0
        //
        // use this for processing any key inputs
        //

        public async void HandleKeyInput(InputAction.CallbackContext context)
        {
            InputAction action = context.action;

            switch (action.name)
            {
            case "StartEdit":
                appState.StartEditSession();
                break;

            case "StopSaveEdit":
                appState.StopSaveEditSession();
                break;

            case "StopDiscardEdit":
                appState.StopDiscardEditSession();
                break;

            case "Exit":
                Debug.Log("FlyingCam.Exit save before quit");
                MapInitialize mi = appState.map.GetComponentInChildren <MapInitialize>();
                await mi.Save();

                Debug.Log("FlyingCam.Exit now quit");
                Application.Quit();
                break;
            }
        }
예제 #2
0
        public async void OnClick()
        {
            Debug.Log("QuitButton.OnClick save before quit");
            MapInitialize mi = AppState.instance.map.GetComponent <MapInitialize>();
            await mi.Save(false);

            Debug.Log("QuitButton.OnClick now quit");
            Application.Quit();
        }