refactor!: renamed GameManager to Universe and HierarchyObject to UniverseObject
This commit is contained in:
@@ -5,10 +5,10 @@ namespace Syntriax.Engine.Core.Factory;
|
||||
|
||||
public class BehaviourFactory
|
||||
{
|
||||
public static T Instantiate<T>(IHierarchyObject hierarchyObject, params object?[]? args) where T : class, IBehaviour
|
||||
=> Instantiate<T>(hierarchyObject, stateEnable: null, args);
|
||||
public static T Instantiate<T>(IUniverseObject universeObject, params object?[]? args) where T : class, IBehaviour
|
||||
=> Instantiate<T>(universeObject, stateEnable: null, args);
|
||||
|
||||
public static T Instantiate<T>(IHierarchyObject hierarchyObject, IStateEnable? stateEnable, params object?[]? args)
|
||||
public static T Instantiate<T>(IUniverseObject universeObject, IStateEnable? stateEnable, params object?[]? args)
|
||||
where T : class, IBehaviour
|
||||
{
|
||||
T behaviour = TypeFactory.Get<T>(args);
|
||||
@@ -19,8 +19,8 @@ public class BehaviourFactory
|
||||
|
||||
if (!behaviour.Assign(stateEnable))
|
||||
throw AssignFailedException.From(behaviour, stateEnable);
|
||||
if (!behaviour.Assign(hierarchyObject.BehaviourController))
|
||||
throw AssignFailedException.From(behaviour, hierarchyObject.BehaviourController);
|
||||
if (!behaviour.Assign(universeObject.BehaviourController))
|
||||
throw AssignFailedException.From(behaviour, universeObject.BehaviourController);
|
||||
|
||||
return behaviour;
|
||||
}
|
||||
|
Reference in New Issue
Block a user