Skip to content

Commit

Permalink
Including Window Origin in centering animation
Browse files Browse the repository at this point in the history
  • Loading branch information
motorlatitude committed Mar 27, 2020
1 parent f7a7afe commit a10f053
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pack_1/cuts_alt/cuts_alt.script
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ for (i = 0; i < 41; i++)
flyingman_sprite = Sprite();

# set image position
flyingman_sprite.SetX(Window.GetWidth() / 2 - flyingman_image[0].GetWidth() / 2); # Place images in the center
flyingman_sprite.SetY(Window.GetHeight() / 2 - flyingman_image[0].GetHeight() / 2);
flyingman_sprite.SetX(Window.GetX() + (Window.GetWidth() / 2 - flyingman_image[0].GetWidth() / 2)); # Place images in the center
flyingman_sprite.SetY(Window.GetY() + (Window.GetHeight() / 2 - flyingman_image[0].GetHeight() / 2));

progress = 0;

Expand All @@ -22,5 +22,5 @@ fun refresh_callback ()
flyingman_sprite.SetImage(flyingman_image[Math.Int(progress / 2) % 41]);
progress++;
}

Plymouth.SetRefreshFunction (refresh_callback);

0 comments on commit a10f053

Please sign in to comment.