diff --git a/ColliderCheck/ColliderCheckFactory.cs b/ColliderCheck/ColliderCheckFactory.cs index 39f73e2..9dbc94b 100644 --- a/ColliderCheck/ColliderCheckFactory.cs +++ b/ColliderCheck/ColliderCheckFactory.cs @@ -1,7 +1,3 @@ -using System; -using System.Linq; -using UnityEngine; - namespace Syntriax.Modules.Movement.ColliderCheck { public class ColliderCheckFactory : TypeFactoryBaseMonoBehaviour diff --git a/IMovementController.cs b/IMovementController.cs new file mode 100644 index 0000000..96b59ea --- /dev/null +++ b/IMovementController.cs @@ -0,0 +1,4 @@ +namespace Syntriax.Modules.Movement +{ + public interface IMovementController : IState { } +} diff --git a/IMovementController.cs.meta b/IMovementController.cs.meta new file mode 100644 index 0000000..56efbfd --- /dev/null +++ b/IMovementController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5764f99e19c73b2478a0d7d183a9bfc9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/MovementControllerFactory.cs b/MovementControllerFactory.cs new file mode 100644 index 0000000..89558e1 --- /dev/null +++ b/MovementControllerFactory.cs @@ -0,0 +1,7 @@ +namespace Syntriax.Modules.Movement +{ + public class MovementControllerFactory : TypeFactoryBaseMonoBehaviour + { + protected override int InitialCapacity => 8; + } +} diff --git a/MovementControllerFactory.cs.meta b/MovementControllerFactory.cs.meta new file mode 100644 index 0000000..5e10e4a --- /dev/null +++ b/MovementControllerFactory.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 975e4749036474b48a4a3fb36949be3f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/MovementFactory.cs b/MovementFactory.cs index b5f8c1f..de17302 100644 --- a/MovementFactory.cs +++ b/MovementFactory.cs @@ -1,6 +1,3 @@ -using System; -using System.Linq; - namespace Syntriax.Modules.Movement { public class MovementFactory : TypeFactoryBaseMonoBehaviour diff --git a/SpecialAction/SpecialActionDeactivateFactory.cs b/SpecialAction/SpecialActionDeactivateFactory.cs index 6095ce8..e5e6edf 100644 --- a/SpecialAction/SpecialActionDeactivateFactory.cs +++ b/SpecialAction/SpecialActionDeactivateFactory.cs @@ -1,6 +1,3 @@ -using System; -using System.Linq; - namespace Syntriax.Modules.Movement.SpecialAction { public class SpecialActionDeactivateFactory : TypeFactoryBaseMonoBehaviour diff --git a/SpecialAction/SpecialActionFactory.cs b/SpecialAction/SpecialActionFactory.cs index d95e3a3..0572d9d 100644 --- a/SpecialAction/SpecialActionFactory.cs +++ b/SpecialAction/SpecialActionFactory.cs @@ -1,6 +1,3 @@ -using System; -using System.Linq; - namespace Syntriax.Modules.Movement.SpecialAction { public class SpecialActionActivateFactory : TypeFactoryBaseMonoBehaviour diff --git a/TypeFactoryBase.cs b/TypeFactoryBase.cs index 2879321..d050d72 100644 --- a/TypeFactoryBase.cs +++ b/TypeFactoryBase.cs @@ -88,6 +88,11 @@ namespace Syntriax.Modules.Movement return gameObject.AddComponent(Types[className]) as T2; } - private static string GetTypeClassName(Type type) => $"{ type.Namespace }.{ type.Name }"; + public static string GetTypeClassName(Type type) + { + if (string.IsNullOrEmpty(type.Namespace)) + return type.Name; + return $"{ type.Namespace }.{ type.Name }"; + } } } diff --git a/VariableMovement/Factories/VariableMovementAssetFactory.cs b/VariableMovement/Factories/VariableMovementAssetFactory.cs index 907bb36..1896f29 100644 --- a/VariableMovement/Factories/VariableMovementAssetFactory.cs +++ b/VariableMovement/Factories/VariableMovementAssetFactory.cs @@ -1,6 +1,3 @@ -using System; -using System.Linq; - namespace Syntriax.Modules.Movement.VariableMovement { public class VariableMovementAssetFactory : TypeFactoryBaseMonoBehaviour diff --git a/VariableMovement/Factories/VariableMovementCollectionFactory.cs b/VariableMovement/Factories/VariableMovementCollectionFactory.cs index b3bb1f0..e394975 100644 --- a/VariableMovement/Factories/VariableMovementCollectionFactory.cs +++ b/VariableMovement/Factories/VariableMovementCollectionFactory.cs @@ -1,6 +1,3 @@ -using System; -using System.Linq; - namespace Syntriax.Modules.Movement.VariableMovement { public class VariableMovementCollectionFactory : TypeFactoryBaseMonoBehaviour diff --git a/VariableMovement/Factories/VariableMovementControllerFactory.cs b/VariableMovement/Factories/VariableMovementControllerFactory.cs index 18320bf..0ef12e4 100644 --- a/VariableMovement/Factories/VariableMovementControllerFactory.cs +++ b/VariableMovement/Factories/VariableMovementControllerFactory.cs @@ -1,6 +1,3 @@ -using System; -using System.Linq; - namespace Syntriax.Modules.Movement.VariableMovement { public class VariableMovementControllerFactory : TypeFactoryBaseMonoBehaviour diff --git a/VariableMovement/Factories/VariableMovementFactory.cs b/VariableMovement/Factories/VariableMovementFactory.cs index a2ef4fb..6e23d78 100644 --- a/VariableMovement/Factories/VariableMovementFactory.cs +++ b/VariableMovement/Factories/VariableMovementFactory.cs @@ -1,6 +1,3 @@ -using System; -using System.Linq; - namespace Syntriax.Modules.Movement.VariableMovement { public class VariableMovementFactory : TypeFactoryBaseMonoBehaviour