1
This commit is contained in:
@@ -17,6 +17,11 @@ namespace BITKit.Animations
|
||||
{
|
||||
public AnimationClip Clip { get; }
|
||||
}
|
||||
public interface IMotionMatchingDualClip
|
||||
{
|
||||
public AnimationClip Clip1 { get; }
|
||||
public AnimationClip Clip2 { get; }
|
||||
}
|
||||
|
||||
public interface IMotionMatchingSequence
|
||||
{
|
||||
@@ -34,4 +39,12 @@ namespace BITKit.Animations
|
||||
[SerializeField] private AnimationClip[] sequence;
|
||||
public AnimationClip[] Sequence => sequence;
|
||||
}
|
||||
[Serializable]
|
||||
public struct MotionMatchingDualClip:IMotionMatchingObject,IMotionMatchingDualClip
|
||||
{
|
||||
[SerializeField] private AnimationClip clip1;
|
||||
[SerializeField] private AnimationClip clip2;
|
||||
public AnimationClip Clip1 => clip1;
|
||||
public AnimationClip Clip2 => clip2;
|
||||
}
|
||||
}
|
||||
|
@@ -104,9 +104,8 @@ namespace BITKit.StateMachine
|
||||
{
|
||||
BIT4Log.Log<MonoStateMachine<TState>>($"TransitionState from {_currentStateName} to {newState.GetType().Name}");
|
||||
}
|
||||
|
||||
newState.OnStateEntry(oldState);
|
||||
CurrentState = newState;
|
||||
newState.OnStateEntry(oldState);
|
||||
OnStateChanged?.Invoke(oldState, newState);
|
||||
_currentStateName = newState.GetType().Name;
|
||||
newState.Enabled = true;
|
||||
|
Reference in New Issue
Block a user