mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-04-12 23:48:59 +08:00
fix: remove unnecessory exit transitions for reactive components (#1161)
This commit is contained in:
parent
5090d45cfe
commit
9dfa0dae23
@ -295,7 +295,8 @@ 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>();
|
||||||
|
|
||||||
transitionBuffer.Add((initialState, new List<AnimatorStateTransition>()));
|
var initialStateTransitionList = new List<AnimatorStateTransition>();
|
||||||
|
transitionBuffer.Add((initialState, initialStateTransitionList));
|
||||||
|
|
||||||
foreach (var group in info.actionGroups.Skip(lastConstant))
|
foreach (var group in info.actionGroups.Skip(lastConstant))
|
||||||
{
|
{
|
||||||
@ -315,8 +316,6 @@ 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
|
||||||
@ -327,13 +326,13 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
hasFixedDuration = true,
|
hasFixedDuration = true,
|
||||||
conditions = (AnimatorCondition[])conditions.Clone()
|
conditions = (AnimatorCondition[])conditions.Clone()
|
||||||
};
|
};
|
||||||
transitions.Add(transition);
|
initialStateTransitionList.Add(transition);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
foreach (var cond in conditions)
|
foreach (var cond in conditions)
|
||||||
{
|
{
|
||||||
transitions.Add(new AnimatorStateTransition
|
initialStateTransitionList.Add(new AnimatorStateTransition
|
||||||
{
|
{
|
||||||
isExit = true,
|
isExit = true,
|
||||||
hasExitTime = false,
|
hasExitTime = false,
|
||||||
@ -343,7 +342,6 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
var state = new AnimatorState();
|
var state = new AnimatorState();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user