Skip to content
Open
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
10 changes: 10 additions & 0 deletions flixel/addons/effects/chainable/FlxEffectSprite.hx
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,19 @@ class FlxEffectSprite extends FlxSprite
_flashRect = pixels.rect;
}

updateHitbox();

super.draw();
}

override public function updateHitbox():Void
{
setSize(scale.x * target.frameWidth, scale.y * target.frameHeight);
offset.x = (target.frameWidth - width) * 0.5;
offset.y = (target.frameHeight - height) * 0.5;
origin.set(frameWidth * 0.5, frameHeight * 0.5);
}

/**
* Core update loop, and updates each active effect.
*/
Expand Down