public PEIModule_EditorOrigin(string name, Color mainColor, PEIMEN_Entity entity) { _name = name; _mainColor = mainColor; _defaultColor = GUI.color; _entity = entity; _isExpand = true; }
private void OnEnable() { _listModuleEditors = new List <PEIModule_EditorOrigin>(); _entity = target as PEIMEN_Entity; _defaultColor = GUI.color; _listModuleEditors.Add(new PEIState_ModuleEditor("State Module", _stateColor, _entity)); _listModuleEditors.Add(new PEIKDE_ModuleEditor("PEIKDE Module", _stateColor, _entity)); }
private static void Init() { if (_ins) { return; } _ins = GetIns <PEIMEN_Entity>(); _event = new PEIEvent_Manager(); _math = new PEIMath(); new PEIMEN_STTimeCC(out _time, I.gameObject); new PEINet_Origin(out _net, I.gameObject); PEIKDE.Log("Entity", "PEIMEN_Entity Init Complete"); }
public PEIState_ModuleEditor(string name, Color mainColor, PEIMEN_Entity gameMode) : base(name, mainColor, gameMode) { _listState = new List <string>(); Type[] types = typeof(PEIMEN_Entity).Assembly.GetTypes(); foreach (var item in types) { object[] attribute = item.GetCustomAttributes(typeof(PEIStateAttribute), false); if (attribute.Length <= 0 || item.IsAbstract) { continue; } PEIStateAttribute stateAttribute = (PEIStateAttribute)attribute[0]; //if (stateAttribute.StateType == VirtualStateType.Ignore) // continue; object obj = Activator.CreateInstance(item); PEIState gs = obj as PEIState; if (gs != null) { _listState.Add("[" + stateAttribute.StateType.ToString() + "]\t" + item.FullName); } //PEIKDE.Log("UDE", "_listState C " + gs); } }
public PEIKDE_ModuleEditor(string name, Color mainColor, PEIMEN_Entity gameMode) : base(name, mainColor, gameMode) { }