public static void DrawUI(int width, int height) { if (ModuleHandler._CoreModules.Keys.Contains("UITextures")) { CoreModule coreModule = null; ModuleHandler._CoreModules.TryGetValue("UITextures", out coreModule); UICore coreMod = (UICore)coreModule; coreMod.DrawUI(width, height); } }
private void glControl_MouseDown(object sender, MouseEventArgs e) { if (ModuleHandler._CoreModules.Keys.Contains("UITextures")) { CoreModule coreModule = null; ModuleHandler._CoreModules.TryGetValue("UITextures", out coreModule); UICore coreMod = (UICore)coreModule; coreMod.OnClick(e.X, e.Y); } GameCore.MouseDown(e.X, e.Y); }
public static bool AddCoreModule(string name, CoreModule m) { if (ModuleHandler._CoreModules.ContainsKey(name)) { return(false); } else { ModuleHandler._CoreModules.Add(name, m); return(true); } }
public static void InvokeStopCoreModule(CoreModule cm) { Assembly _Assemblies = Assembly.GetAssembly(cm.GetType()); Type _Type = cm.GetType(); // Get the desired method we want from the target type. MethodInfo _MethodInfo = null; try { _MethodInfo = _Type.GetMethod("Stop"); } catch (Exception ex) { return; } _MethodInfo.Invoke(cm, null); }
public static bool AddCoreModule(string name, CoreModule m) { if (ModuleHandler._CoreModules.ContainsKey(name)) { return false; } else { ModuleHandler._CoreModules.Add(name, m); return true; } }