Beispiel #1
0
 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);
     }
 }
Beispiel #2
0
 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);
 }
Beispiel #3
0
 public static bool AddCoreModule(string name, CoreModule m)
 {
     if (ModuleHandler._CoreModules.ContainsKey(name))
     {
         return(false);
     }
     else
     {
         ModuleHandler._CoreModules.Add(name, m);
         return(true);
     }
 }
Beispiel #4
0
        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);
        }
Beispiel #5
0
        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);
        }
Beispiel #6
0
 public static bool AddCoreModule(string name, CoreModule m)
 {
     if (ModuleHandler._CoreModules.ContainsKey(name))
     {
         return false;
     }
     else
     {
         ModuleHandler._CoreModules.Add(name, m);
         return true;
     }
 }