示例#1
0
        public static void InitializeRuntimeCoreIfNeeded()
        {
            if (RuntimeCore == null)
            {
                List <Type> RuntimeCoreTypes = IgorRuntimeUtils.GetTypesInheritFrom <IIgorCore>();

                if (RuntimeCoreTypes.Count > 0)
                {
                    RuntimeCore = (IIgorCore)Activator.CreateInstance(RuntimeCoreTypes[0]);
                }
            }
        }
示例#2
0
        public virtual List <string> GetAllDerivedTestStateTypes()
        {
            List <Type>   DerivedTypes = IgorRuntimeUtils.GetTypesInheritFrom <MonsterTestState>();
            List <string> TypeNames    = new List <string>();

            foreach (Type CurrentType in DerivedTypes)
            {
                MonsterTestState StateInst = (MonsterTestState)Activator.CreateInstance(CurrentType);

                TypeNames.Add(StateInst.GetEntityName());
            }

            return(TypeNames);
        }
示例#3
0
        public static void RegisterEditorTypes()
        {
            TypeUtils.RegisterAllTypes();

            List <Type> InspectableTypes = IgorRuntimeUtils.GetTypesInheritFrom <InspectableObject>();

            foreach (Type CurrentInspectableType in InspectableTypes)
            {
                MethodInfo RegisterFunction = CurrentInspectableType.GetMethod("RegisterEditorType", BindingFlags.Static | BindingFlags.Public | BindingFlags.DeclaredOnly);

                if (RegisterFunction != null)
                {
                    RegisterFunction.Invoke(null, new object[] {});
                }
            }
        }
示例#4
0
        public static void RegisterAllTypes()
        {
            List <Type> XMLTypes = IgorRuntimeUtils.GetTypesInheritFrom <XMLSerializable>();

            foreach (Type CurrentXMLType in XMLTypes)
            {
                MethodInfo RegisterFunction = CurrentXMLType.GetMethod("RegisterType", BindingFlags.Static | BindingFlags.Public | BindingFlags.DeclaredOnly);

                if (RegisterFunction != null)
                {
                    RegisterFunction.Invoke(null, new object[] {});
                }
            }

            XMLSerializable.bSafeToLoad = true;
        }
示例#5
0
 public static List <Type> GetTypesInheritFromIIGorEditorCore()
 {
     return(IgorRuntimeUtils.GetTypesInheritFrom <IIgorEditorCore>());
 }