コード例 #1
0
ファイル: RuntimeHandler.cs プロジェクト: fire-eggs/CivOne
        private RuntimeHandler(IRuntime runtime)
        {
            Runtime = runtime;

            // fire-eggs 20170711 init the RNG if user specified
            if (runtime.Settings.InitialSeed != 0)
            {
                Common.SetRandomSeed(runtime.Settings.InitialSeed);
            }
            else
            {
                Common.SetRandomSeed(-1);
            }


            runtime.Initialize   += OnInitialize;
            runtime.Update       += OnUpdate;
            runtime.Draw         += OnDraw;
            runtime.KeyboardUp   += OnKeyboardUp;
            runtime.KeyboardDown += OnKeyboardDown;
            runtime.MouseUp      += OnMouseUp;
            runtime.MouseDown    += OnMouseDown;
            runtime.MouseMove    += OnMouseMove;

            foreach (Plugin plugin in Reflect.Plugins())
            {
                runtime.Log($"Plugin loaded: {plugin.Name} version {plugin.Version} by {plugin.Author}");
            }

            Task.Run(() => Reflect.PreloadCivilopedia());
        }
コード例 #2
0
ファイル: RuntimeHandler.cs プロジェクト: mattitk/CivOne
        private RuntimeHandler(IRuntime runtime)
        {
            Runtime = runtime;

            runtime.Initialize   += OnInitialize;
            runtime.Update       += OnUpdate;
            runtime.Draw         += OnDraw;
            runtime.KeyboardUp   += OnKeyboardUp;
            runtime.KeyboardDown += OnKeyboardDown;
            runtime.MouseUp      += OnMouseUp;
            runtime.MouseDown    += OnMouseDown;
            runtime.MouseMove    += OnMouseMove;

            foreach (Plugin plugin in Reflect.Plugins())
            {
                runtime.Log($"Plugin loaded: {plugin.Name} version {plugin.Version} by {plugin.Author}");
            }

            Task.Run(() => Reflect.PreloadCivilopedia());
        }
コード例 #3
0
ファイル: Window.cs プロジェクト: AlexFolland/CivOne
 private static void LoadResources()
 {
     Task.Run(() => Reflect.PreloadCivilopedia());
 }