Exemplo n.º 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);
     }
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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;
     }
 }