Ejemplo n.º 1
0
    private void LoadConfig()
    {
        _isEditorMode   = EditorPrefs.GetBool("GameConfig.IsEditorMode", false);
        _isHotfixEnable = EditorPrefs.GetBool("GameConfig.IsHotfixEnable", false);

        _os                 = (OS)EditorPrefs.GetInt("GameConfig.OS", (int)OS.Windows);
        _platform           = (Platform)EditorPrefs.GetInt("GameConfig.Platform", (int)Platform.Android);
        _gameServerHost     = (GameServerHost)EditorPrefs.GetInt("GameConfig.GameServerHost", (int)GameServerHost.Debug);
        _resourceServerHost = (ResourceServerHost)EditorPrefs.GetInt("GameConfig.ResourceServerHost", (int)ResourceServerHost.Debug);
    }
Ejemplo n.º 2
0
        public static void Start()
        {
            DatabaseHost.Connect("mongodb://localhost");

            WebServer  = new WebServerHost();
            GameServer = new GameServerHost();

            WebServer.Start();
            GameServer.Start();

            Thread.Sleep(-1);
        }
Ejemplo n.º 3
0
    private void OnGUI()
    {
        GUILayout.Label("Base Settings:", EditorStyles.boldLabel);

        _isEditorMode   = EditorGUILayout.Toggle("Is Editor Mode", _isEditorMode);
        _isHotfixEnable = EditorGUILayout.Toggle("Is Hotfix Enable", _isHotfixEnable);

        _os                 = (OS)EditorGUILayout.EnumPopup("OS", _os);
        _platform           = (Platform)EditorGUILayout.EnumPopup("Platform", _platform);
        _gameServerHost     = (GameServerHost)EditorGUILayout.EnumPopup("GameServerHost", _gameServerHost);
        _resourceServerHost = (ResourceServerHost)EditorGUILayout.EnumPopup("ResourceServerHost", _resourceServerHost);


        if (GUILayout.Button("Save"))
        {
            this.SaveConfig();
            this.SetSymbols();
        }
    }