Skip to content

Commit

Permalink
feat: rename schema
Browse files Browse the repository at this point in the history
  • Loading branch information
luzhuang committed Jul 19, 2024
1 parent 197022f commit 4cb5b08
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/loader/src/AnimatorControllerLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class AnimatorControllerLoader extends Loader<AnimatorController> {
}
});
transitions.forEach((transitionData: ITransitionData) => {
const transition = this._createTransition(transitionData, statesMap[transitionData.targetStateId]);
const transition = this._createTransition(transitionData, statesMap[transitionData.destinationStateId]);
transitionsMap[transitionData.id] = transition;
});

Expand All @@ -87,13 +87,13 @@ class AnimatorControllerLoader extends Loader<AnimatorController> {

entryTransitions.forEach((entryTransitionData: ITransitionData) => {
stateMachine.addEntryStateTransition(
this._createTransition(entryTransitionData, statesMap[entryTransitionData.targetStateId])
this._createTransition(entryTransitionData, statesMap[entryTransitionData.destinationStateId])
);
});

anyTransitions.forEach((anyTransitionData: ITransitionData) => {
stateMachine.addAnyStateTransition(
this._createTransition(anyTransitionData, statesMap[anyTransitionData.targetStateId])
this._createTransition(anyTransitionData, statesMap[anyTransitionData.destinationStateId])
);
});
}
Expand Down Expand Up @@ -126,6 +126,7 @@ class AnimatorControllerLoader extends Loader<AnimatorController> {
transition.mute = transitionData.mute;
// @ts-ignore
transition._isExit = transitionData.isExit;
debugger;
transition.destinationState = destinationState;
transitionData.conditions.forEach((conditionData) => {
transition.addCondition(conditionData.mode, conditionData.parameterName, conditionData.threshold);
Expand Down Expand Up @@ -154,7 +155,7 @@ interface ITransitionData {
duration: number;
offset: number;
exitTime: number;
targetStateId: string;
destinationStateId: string;
solo: boolean;
mute: boolean;
isExit: boolean;
Expand Down

0 comments on commit 4cb5b08

Please sign in to comment.