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()); }
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()); }