mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-01 12:15:05 +08:00
This reverts commit 9dfa0dae23
. Those
transitions are needed when controlling the same object from multiple
parameters.
Closes: #1233
This commit is contained in:
parent
36e035c8c7
commit
02204c272f
@ -300,8 +300,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
var transitionBuffer = new List<(AnimatorState, List<AnimatorStateTransition>)>();
|
var transitionBuffer = new List<(AnimatorState, List<AnimatorStateTransition>)>();
|
||||||
var entryTransitions = new List<AnimatorTransition>();
|
var entryTransitions = new List<AnimatorTransition>();
|
||||||
|
|
||||||
var initialStateTransitionList = new List<AnimatorStateTransition>();
|
transitionBuffer.Add((initialState, new List<AnimatorStateTransition>()));
|
||||||
transitionBuffer.Add((initialState, initialStateTransitionList));
|
|
||||||
|
|
||||||
foreach (var group in info.actionGroups.Skip(lastConstant))
|
foreach (var group in info.actionGroups.Skip(lastConstant))
|
||||||
{
|
{
|
||||||
@ -321,6 +320,8 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
|
|
||||||
var conditions = GetTransitionConditions(asc, group);
|
var conditions = GetTransitionConditions(asc, group);
|
||||||
|
|
||||||
|
foreach (var (st, transitions) in transitionBuffer)
|
||||||
|
{
|
||||||
if (!group.Inverted)
|
if (!group.Inverted)
|
||||||
{
|
{
|
||||||
var transition = new AnimatorStateTransition
|
var transition = new AnimatorStateTransition
|
||||||
@ -331,13 +332,13 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
hasFixedDuration = true,
|
hasFixedDuration = true,
|
||||||
conditions = (AnimatorCondition[])conditions.Clone()
|
conditions = (AnimatorCondition[])conditions.Clone()
|
||||||
};
|
};
|
||||||
initialStateTransitionList.Add(transition);
|
transitions.Add(transition);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
foreach (var cond in conditions)
|
foreach (var cond in conditions)
|
||||||
{
|
{
|
||||||
initialStateTransitionList.Add(new AnimatorStateTransition
|
transitions.Add(new AnimatorStateTransition
|
||||||
{
|
{
|
||||||
isExit = true,
|
isExit = true,
|
||||||
hasExitTime = false,
|
hasExitTime = false,
|
||||||
@ -347,6 +348,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var state = new AnimatorState();
|
var state = new AnimatorState();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user