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

Untie FlxSoundTray animation speed from framerate, and make it much smoother #2923

Merged
merged 3 commits into from
Oct 4, 2023
Merged
Changes from 2 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
8 changes: 4 additions & 4 deletions flixel/system/ui/FlxSoundTray.hx
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,18 @@ class FlxSoundTray extends Sprite
}

/**
* This function just updates the soundtray object.
* This function updates the soundtray object.
*/
public function update(MS:Float):Void
{
// Animate stupid sound tray thing
// Animate sound tray thing
if (_timer > 0)
{
_timer -= MS / 1000;
_timer -= (MS / 1000);
}
else if (y > -height)
{
y -= (MS / 1000) * FlxG.height * 2;
y -= FlxG.height * FlxG.elapsed;
CyndaquilDAC marked this conversation as resolved.
Show resolved Hide resolved

if (y <= -height)
{
Expand Down
Loading