Ejemplo n.º 1
0
    void Awake()
    {
        DontDestroyOnLoad(gameObject);

        console.Initialize();
        console.SetTitle("Fragsurf Server");

        input.OnInputText += OnInputText;

        Application.SetStackTraceLogType(LogType.Log, StackTraceLogType.None);
        Application.SetStackTraceLogType(LogType.Error, StackTraceLogType.ScriptOnly);
        //Application.logMessageReceived += HandleLog;
        DevConsole.OnMessageLogged += FSConsole_OnMessageLogged;

        Debug.Log("Console Started");
    }
Ejemplo n.º 2
0
    void Awake()
    {
        DontDestroyOnLoad(gameObject);

        console.Initialize();
        console.SetTitle(Title);
        Application.logMessageReceived += HandleLog;
        Debug.Log("[Info] Console Started");
    }
Ejemplo n.º 3
0
    void OnEnable()
    {
        DontDestroyOnLoad(gameObject);

        console.Initialize();
        console.SetTitle("Game Station 13 Server");

        input.OnInputText += OnInputText;

        Application.RegisterLogCallback(HandleLog);

        Debug.Log("Console Started");
    }
Ejemplo n.º 4
0
    //
    // Create console window, register callbacks
    //
    void Awake()
    {
        DontDestroyOnLoad(gameObject);

        console.Initialize();
        console.SetTitle("UDynNet POC Server");

        input.OnInputText += OnInputText;
        networkManager     = gameObject.GetComponent <NakNetworkManager>();
        Application.logMessageReceived += HandleLog;

        Debug.Log("Console Started");
    }
Ejemplo n.º 5
0
    //
    // Create console window, register callbacks
    //
    void Awake()
    {
#if SERVER
        DontDestroyOnLoad(gameObject);
        system = GetComponent <ConsoleSystem>();

        console.Initialize();
        console.SetTitle("Server");

        input.OnInputText += OnInputText;

        Application.RegisterLogCallback(HandleLog);
#endif
    }
Ejemplo n.º 6
0
    //
    // Create console window, register callbacks
    //
    void Start()
    {
        Utilities.DontDestroyOnLoad(this.gameObject);

        console.Initialize();
        console.SetTitle("Dedicated Server Console");

        input.OnInputText += OnInputText;

        Application.logMessageReceived += HandleLog;

        Debug.Log("Console Started");

        consoleStarted = true;
    }
Ejemplo n.º 7
0
    void Awake()
    {
        DontDestroyOnLoad(gameObject);

        console.Initialize();
        console.SetTitle("Celtic Survival Master Server");

        input.OnInputText += OnInputText;

        Application.logMessageReceived += HandleLog;

        Debug.Log("**************************************************");
        Debug.Log("*        Celtic Survival Master Server 1.0       *");
        Debug.Log("*        Copyright 2016 Idiosyncratic Games      *");
        Debug.Log("**************************************************");

        server.InitializeServer();
    }
Ejemplo n.º 8
0
    void StartConsoleServer()
    {
        // Initialize our console.
        console.Initialize();

        // Set initial console title.
        console.SetTitle("Server");

        // Add input listener.
        input.OnInputText += OnInputText;

        // Add output listener.
        Application.logMessageReceived += HandleLog;

        // Check for invalid server configuration.
        if (!(serverID >= 0 && serverID < serverConfigurations.Count))
        {
            Debug.LogError("Invalid server configuration ID.");
            return;
        }

        // Get server configuration for ID.
        ServerConfiguration config = serverConfigurations[serverID];

        // Make sure configuration is not empty.
        if (config == null)
        {
            Debug.LogError("Server configuration not valid (ID: " + serverID + ").");
            return;
        }

        // Check for custom port.
        if (!customPort)
        {
            // Assign default port.
            serverPort = config.port;
        }

        // Assign title for configuration.
        console.SetTitle("(MMO) - " + config.name);

        Debug.LogWarning("Empty MMO RPG Server ~ " + config.name);

        Debug.Log("Configuration ID: " + serverID.ToString() + " on Port: " + serverPort.ToString());

        Debug.Log("Starting server scene \"" + config.onlineSceneName + "\"");

        // Load our offline scene.
        SceneManager.LoadScene("Offline");

        // Instantiate network manager
        GameObject networkManagerObject = Instantiate(networkManagerPrefab);

        // Get network manager component.
        networkManager = networkManagerObject.GetComponent <MMOManager>();

        // Assign values to network manager.
        networkManager.networkPort = serverPort;
        networkManager.onlineScene = config.onlineSceneName;

        // Attempt to start network manager server.
        if (networkManager.StartServer())
        {
            Debug.Log("Network manager spawned and server was started!");
        }
    }