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:
parent
6aeb2ae280
commit
ab8aa5fb9a
27 changed files with 480 additions and 190 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in a new issue