(BREAKING) Replace structs with classes

This commit is contained in:
Haï~
2023-10-02 04:53:27 +02:00
parent fd5c47e83c
commit a1e5a43491
4 changed files with 3 additions and 14 deletions
-6
View File
@@ -308,9 +308,6 @@ namespace AnimatorAsCode.V1
public override TBehaviour EnsureBehaviour<TBehaviour>()
{
if (behaviorCache.TryGetValue(typeof(TBehaviour), out var existingBehavior))
return (TBehaviour)existingBehavior;
foreach (var behaviour in Machine.behaviours)
if (behaviour is TBehaviour myBehaviour)
return myBehaviour;
@@ -462,9 +459,6 @@ namespace AnimatorAsCode.V1
public override TBehaviour EnsureBehaviour<TBehaviour>()
{
if (behaviorCache.TryGetValue(typeof(TBehaviour), out var existingBehavior))
return (TBehaviour)existingBehavior;
foreach (var behaviour in State.behaviours)
if (behaviour is TBehaviour myBehaviour)
return myBehaviour;