Esempio n. 1
0
        // OnDestroy
        void OnDestroy()
        {
            currentTab = 0;

            SurfaceDetectorTab.FullReset();
            InputSettingsTab.FullReset();
            GameSettingsTab.FullReset();

            AssetDatabase.DeleteAsset(mainDirectory + "/tmp");
        }
Esempio n. 2
0
        // OnGUI
        void OnGUI()
        {
            width = position.width;

            GUILayout.Space(7f);
            currentTab = GUILayout.Toolbar(currentTab, tabs, GUILayout.ExpandWidth(true), GUILayout.Height(35f));
            GUILayout.Space(8f);

            EditorGUILayout.BeginHorizontal();

            switch (currentTab)
            {
            case 0:     // Surfaces
                SurfaceDetectorTab.OnWindowGUI();
                break;

            case 1:     // Input
                InputSettingsTab.OnWindowGUI();
                break;

            case 2:     // Game
                GameSettingsTab.OnWindowGUI();
                break;
            }

            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            const float height = 30f;
            bool        load   = GUILayout.Button("Reload Settings", GUILayout.Height(height));
            bool        save   = GUILayout.Button("Save Settings", GUILayout.Height(height));

            EditorGUILayout.EndHorizontal();

            if (save)
            {
                SurfaceDetectorTab.SaveSettings();
                InputSettingsTab.SaveSettings();
                GameSettingsTab.SaveSettings();
            }

            if (load && EditorUtility.DisplayDialog("ASK Settings Warning!", "Warning: All changes will be reset! Сontinue?", "Yes", "No"))
            {
                SurfaceDetectorTab.ReloadSettings();
                InputSettingsTab.ReloadSettings();
                GameSettingsTab.ReloadSettings();
            }
        }
Esempio n. 3
0
 // SetupIt
 private static void SetupIt()
 {
     SurfaceDetectorTab.SetupTab();
     InputSettingsTab.SetupTab();
     GameSettingsTab.SetupTab();
 }