예제 #1
0
        protected SandboxGameAssemblyWrapper()
        {
            m_instance    = this;
            m_isDebugging = false;
            m_isUsingCommonProgramData = false;
            m_isInSafeMode             = false;

            m_assembly = Assembly.UnsafeLoadFrom("Sandbox.Game.dll");

            m_mainGameType   = m_assembly.GetType(MainGameNamespace + "." + MainGameClass);
            m_serverCoreType = m_assembly.GetType(ServerCoreClass);

            m_mainGameInstanceField = m_mainGameType.GetField(MainGameInstanceField, BindingFlags.Static | BindingFlags.Public);
            m_configContainerField  = m_mainGameType.GetField(MainGameConfigContainerField, BindingFlags.Static | BindingFlags.Public);
            m_configContainerType   = m_configContainerField.FieldType;
            m_serverCoreNullRender  = m_serverCoreType.GetField(ServerCoreNullRenderField, BindingFlags.Public | BindingFlags.Static);

            m_configContainerDedicatedDataField = m_configContainerType.GetField(ConfigContainerDedicatedDataField, BindingFlags.NonPublic | BindingFlags.Instance);
            m_setConfigWorldName = m_configContainerType.GetMethod(ConfigContainerSetWorldName, BindingFlags.Public | BindingFlags.Instance);

            m_lastProfilingOutput  = DateTime.Now;
            m_countQueuedActions   = 0;
            m_averageQueuedActions = 0;

            Console.WriteLine("Finished loading SandboxGameAssemblyWrapper");
        }
        protected SandboxGameAssemblyWrapper()
        {
            m_instance = this;
            m_isDebugging = false;
            m_isUsingCommonProgramData = false;
            m_isInSafeMode = false;

            m_assembly = Assembly.UnsafeLoadFrom("Sandbox.Game.dll");

            m_mainGameType = m_assembly.GetType(MainGameNamespace + "." + MainGameClass);
            m_serverCoreType = m_assembly.GetType(ServerCoreClass);

            m_mainGameInstanceField = m_mainGameType.GetField(MainGameInstanceField, BindingFlags.Static | BindingFlags.Public);
            m_configContainerField = m_mainGameType.GetField(MainGameConfigContainerField, BindingFlags.Static | BindingFlags.Public);
            m_configContainerType = m_configContainerField.FieldType;
            m_serverCoreNullRender = m_serverCoreType.GetField(ServerCoreNullRenderField, BindingFlags.Public | BindingFlags.Static);

            m_configContainerDedicatedDataField = m_configContainerType.GetField(ConfigContainerDedicatedDataField, BindingFlags.NonPublic | BindingFlags.Instance);
            m_setConfigWorldName = m_configContainerType.GetMethod(ConfigContainerSetWorldName, BindingFlags.Public | BindingFlags.Instance);

            m_lastProfilingOutput = DateTime.Now;
            m_countQueuedActions = 0;
            m_averageQueuedActions = 0;

            Console.WriteLine("Finished loading SandboxGameAssemblyWrapper");
        }
        protected SandboxGameAssemblyWrapper()
        {
            m_instance = this;
            m_isDebugging = false;
            m_isUsingCommonProgramData = false;
            m_isInSafeMode = false;

            m_assembly = Assembly.UnsafeLoadFrom("Sandbox.Game.dll");

            m_lastProfilingOutput = DateTime.Now;
            m_countQueuedActions = 0;
            m_averageQueuedActions = 0;

            Console.WriteLine("Finished loading SandboxGameAssemblyWrapper");
        }
        protected SandboxGameAssemblyWrapper( )
        {
            m_instance = this;
            ExtenderOptions.UseCommonProgramData = false;
            ExtenderOptions.IsInSafeMode = false;
            m_gameThread = null;

            string assemblyPath = Path.Combine( AppDomain.CurrentDomain.BaseDirectory, "Sandbox.Game.dll" );
            m_assembly = Assembly.UnsafeLoadFrom( assemblyPath );

            m_lastProfilingOutput = DateTime.Now;
            m_countQueuedActions = 0;
            m_averageQueuedActions = 0;

            ApplicationLog.BaseLog.Info( "Finished loading SandboxGameAssemblyWrapper" );
        }
        protected SandboxGameAssemblyWrapper( )
        {
            m_instance = this;
            ExtenderOptions.UseCommonProgramData = false;
            ExtenderOptions.IsInSafeMode         = false;
            m_gameThread = null;

            string assemblyPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Sandbox.Game.dll");

            m_assembly = Assembly.UnsafeLoadFrom(assemblyPath);

            m_lastProfilingOutput  = DateTime.Now;
            m_countQueuedActions   = 0;
            m_averageQueuedActions = 0;

            ApplicationLog.BaseLog.Info("Finished loading SandboxGameAssemblyWrapper");
        }
예제 #6
0
        protected SandboxGameAssemblyWrapper()
        {
            m_instance    = this;
            m_isDebugging = false;
            m_isUsingCommonProgramData = false;
            m_isInSafeMode             = false;

            string assemblyPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Sandbox.Game.dll");

            m_assembly = Assembly.UnsafeLoadFrom(assemblyPath);

            m_lastProfilingOutput  = DateTime.Now;
            m_countQueuedActions   = 0;
            m_averageQueuedActions = 0;

            Console.WriteLine("Finished loading SandboxGameAssemblyWrapper");
        }
		protected SandboxGameAssemblyWrapper()
		{
			m_instance = this;
			m_isDebugging = false;
			m_isUsingCommonProgramData = false;
			m_isInSafeMode = false;

			string assemblyPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Sandbox.Game.dll");
			m_assembly = Assembly.UnsafeLoadFrom(assemblyPath);

			m_lastProfilingOutput = DateTime.Now;
			m_countQueuedActions = 0;
			m_averageQueuedActions = 0;

			Console.WriteLine("Finished loading SandboxGameAssemblyWrapper");
		}
예제 #8
0
		private bool SetupManagers()
		{
			m_serverWrapper = ServerAssemblyWrapper.Instance;
			m_pluginManager = PluginManager.Instance;
			m_gameAssemblyWrapper = SandboxGameAssemblyWrapper.Instance;
			m_factionsManager = FactionsManager.Instance;
			m_logManager = LogManager.Instance;
			m_entityEventManager = EntityEventManager.Instance;
			m_chatManager = ChatManager.Instance;

			return true;
		}
예제 #9
0
		public static void BeginGameAction(Action action, SandboxGameAssemblyWrapper.GameActionCallback callback, Object state)
		{
			SandboxGameAssemblyWrapper.Instance.BeginGameAction(action, callback, state);
		}