Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v3.8.6] [Tween] Add unit test for Pull Request #18117 #18182

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions tests/tween/tween.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4941,3 +4941,26 @@ test('parallel with two call tween', function () {

director.unregisterSystem(sys);
});

test('parallel with set action', function () {
const sys = new TweenSystem();
(TweenSystem.instance as any) = sys;
director.registerSystem(TweenSystem.ID, sys, System.Priority.MEDIUM);

const node = new Node();
const node2 = new Node();

tween(node)
.parallel(
tween(node).by(1, { position: v3(1, 1, 1) }),
tween(node2).set({ position: v3(2, 2, 2) })
)
.start();

runFrames(1); // start
runFrames(60);

expect(node2.position.equals(v3(2, 2, 2))).toBeTruthy();

director.unregisterSystem(sys);
});
Loading