Exemplo n.º 1
0
        /// <summary>
        /// Starts the internal tick system, and begins running game logic.
        /// </summary>
        public static void StartGame()
        {
            if (World.Mode == EngineMode.ServerOnly)
            {
                foreach (KeyValuePair <Guid, System.Net.Sockets.Socket> item
                         in ServerSendRecieve.TCPServer.PlayerToSocket)
                {
                    if (!WorldUtil.PlayerHasCharacter(item.Key))
                    {
                        WorldUtil.SpawnRandomCharacter(item.Key, 0);
                        WorldUtil.SpawnRandomCharacter(item.Key, 0);
                        WorldUtil.SpawnRandomCharacter(item.Key, 0);
                    }
                }
            }

            if (World.Mode == EngineMode.ServerAndClient)
            {
                if (!WorldUtil.PlayerHasCharacter(SettingsManager.PlayerSettings.Settings.PlayerID))
                {
                    WorldUtil.SpawnRandomCharacter(SettingsManager.PlayerSettings.Settings.PlayerID, 0);
                    WorldUtil.SpawnRandomCharacter(SettingsManager.PlayerSettings.Settings.PlayerID, 0);
                    WorldUtil.SpawnRandomCharacter(SettingsManager.PlayerSettings.Settings.PlayerID, 0);
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Starts the internal tick system, and begins running game logic.
        /// </summary>
        public static void StartGame()
        {
            foreach (KeyValuePair <Guid, JobSystem.JobSystem> item in JobSystem.JobSystemManager.Manager.PlayerToJobSystem)
            {
                if (item.Value.Idle.Count == 0 && item.Value.Busy.Count == 0)
                {
                    //Spawns a creature in the default dimension (0).
                    WorldUtil.SpawnRandomCharacter(item.Key, 0);
                }
            }

            SetupTick();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Starts the internal tick system, and begins running game logic.
        /// </summary>
        public static void StartGame()
        {
            if (World.Mode == EngineMode.ServerOnly)
            {
                foreach (KeyValuePair <Guid, System.Net.Sockets.Socket> item
                         in ServerSendRecieve.TCPServer.PlayerToSocket)
                {
                    WorldUtil.SpawnRandomCharacter(item.Key, 0);
                    WorldUtil.SpawnRandomCharacter(item.Key, 0);
                    WorldUtil.SpawnRandomCharacter(item.Key, 0);
                }
            }

            if (World.Mode == EngineMode.ServerAndClient)
            {
                WorldUtil.SpawnRandomCharacter(Player.Default.PlayerID, 0);
                WorldUtil.SpawnRandomCharacter(Player.Default.PlayerID, 0);
                WorldUtil.SpawnRandomCharacter(Player.Default.PlayerID, 0);
            }

            SetupTick();
        }