Skip to content

Commit

Permalink
feat: reduce lifeup flashing
Browse files Browse the repository at this point in the history
  • Loading branch information
hteumeuleu committed Feb 12, 2023
1 parent 15f1e2b commit 4f774f2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Source/Scripts/celeste.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1014,10 +1014,12 @@ lifeup = {
end,
draw=function(this)
this.flash+=0.5
if math.floor(this.flash) % 2 == 0 then
this.pdspr:setImageDrawMode(GFX.kDrawModeInverted)
else
this.pdspr:setImageDrawMode(GFX.kDrawModeCopy)
if not reduce_flashing then
if math.floor(this.flash) % 2 == 0 then
this.pdspr:setImageDrawMode(GFX.kDrawModeInverted)
else
this.pdspr:setImageDrawMode(GFX.kDrawModeCopy)
end
end
this.pdspr:moveTo(kDrawOffsetX + this.x-2, kDrawOffsetY + this.y)
end
Expand Down

0 comments on commit 4f774f2

Please sign in to comment.