Control Modules & Job System

Agent behaviors are no longer hard coded but instead created by equippable control modules
Game Context has a job system which assigns appropriate tasks to drone control modules
This commit is contained in:
hyperion51 2020-05-07 03:53:54 +01:00
commit ab8aa5fb9a
27 changed files with 480 additions and 190 deletions

View file

@ -364,6 +364,19 @@ public class DatabaseInspector : EditorWindow
}
menu.ShowAsContext();
}
else if (listType.IsAbstract)
{
var menu = new GenericMenu();
foreach (var behaviorType in listType.GetAllChildClasses().Where(t=>!t.IsAbstract))
{
menu.AddItem(new GUIContent(behaviorType.Name), false, () =>
{
list.Add(Activator.CreateInstance(behaviorType));
DatabaseCache.Add(entry);
});
}
menu.ShowAsContext();
}
else
{
list.Add(Activator.CreateInstance(listType));