Skip to content

Commit 4998a3c

Browse files
committed
Discontinued non-enum-based States
1 parent b1ec0f7 commit 4998a3c

File tree

13 files changed

+23
-531
lines changed

13 files changed

+23
-531
lines changed

Runtime/StateMachines/Exceptions/StateUnavailableException.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,5 @@ public class StateUnavailableException : System.Exception
55
{
66
public StateUnavailableException(System.Enum key)
77
: base(string.Format("No state with key '{0}' was registered.", key)) { }
8-
9-
public StateUnavailableException(string name)
10-
: base(string.Format("No state with name '{0}' was registered.", name)) { }
118
}
129
}

Runtime/StateMachines/Interfaces/IState.cs

Lines changed: 0 additions & 55 deletions
This file was deleted.

Runtime/StateMachines/Interfaces/IState.cs.meta

Lines changed: 0 additions & 11 deletions
This file was deleted.

Runtime/StateMachines/Interfaces/IStateMachine.cs

Lines changed: 0 additions & 63 deletions
This file was deleted.

Runtime/StateMachines/Interfaces/IStateMachine.cs.meta

Lines changed: 0 additions & 11 deletions
This file was deleted.

Runtime/StateMachines/Interfaces/IStateT.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ public interface IState<TEnum> where TEnum: System.Enum
1616
/// </summary>
1717
TEnum Key { get; }
1818

19-
/// <summary>
20-
/// A delegate that the <see cref="IState{TEnum}"/> can use to obtain a reference to other
21-
/// <see cref="IState{TEnum}"/>s from the same <see cref="IStateMachine{TEnum}"/>.
22-
/// </summary>
23-
System.Func<TEnum, IState<TEnum>> StateRegister { get; set; }
24-
2519
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2620
#endregion
2721
#region Interface Methods
@@ -46,11 +40,11 @@ void Exit() { }
4640
/// The amount of time (in seconds) that has passed since the prior update.
4741
/// </param>
4842
/// <returns>
49-
/// A <see cref="IState{TEnum}"/> if a transition to said <see cref="IState{TEnum}"/> is required.
43+
/// A <typeparamref name="TEnum"/> if a transition to a matching <see cref="IState{TEnum}"/> is required.
5044
/// <see cref="null"/> if no <see cref="IState{TEnum}"/> transition is required.
5145
/// </returns>
52-
IState<TEnum> Update(float deltaTime)
53-
=> null;
46+
TEnum Update(float deltaTime)
47+
=> default;
5448

5549
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
5650
#endregion

Runtime/StateMachines/State.cs

Lines changed: 0 additions & 84 deletions
This file was deleted.

Runtime/StateMachines/State.cs.meta

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)