コード例 #1
0
    void Awake()
    {
        gameSettings = new GameSettings();

        Application.runInBackground = true;

        autosaveLocation = Application.persistentDataPath + "/autosave.chart";

        viewMode = ViewMode.Chart;
        editor   = ChartEditor.Instance;

#if !UNITY_EDITOR
        workingDirectory = DirectoryHelper.GetMainDirectory();
#else
        workingDirectory = Application.dataPath;
#endif
        // Bass init
        string audioInitErr = string.Empty;
        if (!AudioManager.Init(out audioInitErr))
        {
            editor.errorManager.QueueErrorMessage(audioInitErr);
        }

        LoadGameSettings();
        Localiser.LocaliseScene();

        localEvents  = LoadCommonEvents(Path.Combine(CONFIG_FOLDER, "local_events.txt"));
        globalEvents = LoadCommonEvents(Path.Combine(CONFIG_FOLDER, "global_events.txt"));

        HintMouseOver.style = hintMouseOverStyle;
    }
コード例 #2
0
    void Awake()
    {
        Application.runInBackground = true;

        largestRes = Screen.resolutions[0];
        foreach (Resolution res in Screen.resolutions)
        {
            if (res.width > largestRes.width)
            {
                largestRes = res;
            }
        }
        autosaveLocation = Application.persistentDataPath + "/autosave.chart";

        viewMode = ViewMode.Chart;
        editor   = ChartEditor.Instance;

#if !UNITY_EDITOR
        workingDirectory = DirectoryHelper.GetMainDirectory();
#else
        workingDirectory = Application.dataPath;
#endif
        // Bass init
        string audioInitErr = string.Empty;
        if (!AudioManager.Init(out audioInitErr))
        {
            editor.errorManager.QueueErrorMessage(audioInitErr);
        }

        LoadGameSettings();
        Localiser.LocaliseScene();

        localEvents  = LoadCommonEvents("local_events.txt");
        globalEvents = LoadCommonEvents("global_events.txt");

        InputField[] allInputFields = Resources.FindObjectsOfTypeAll <InputField>();
        foreach (InputField inputField in allInputFields)
        {
            inputField.gameObject.AddComponent <InputFieldDoubleClick>();
        }

        HintMouseOver.style = hintMouseOverStyle;
    }
コード例 #3
0
    void Close(bool rebindSuccess)
    {
        this.device = null;
        if (!rebindSuccess && rebinder != null)
        {
            rebinder.RevertMapBeingRebound();
        }

        rebinder = null;
        gameObject.SetActive(false);
        rebindCompleteEvent.Fire();

        if (ChartEditor.Instance)
        {
            ChartEditor.Instance.uiServices.SetPopupBlockingEnabled(false);
        }

        Localiser.LocaliseScene();
    }