mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 13:44:59 +00:00
A lot of FPS agnosticism, added def lerp
This commit is contained in:
@@ -1298,11 +1298,11 @@ def pbAnimationsOrganiser
|
||||
list.delete_at(cmd[1])
|
||||
cmd[1] = [cmd[1], list.length - 1].min
|
||||
refreshlist = true
|
||||
pbWait(Graphics.frame_rate * 2 / 10)
|
||||
pbWait(0.2)
|
||||
when 4 # Insert spot
|
||||
list.insert(cmd[1], PBAnimation.new)
|
||||
refreshlist = true
|
||||
pbWait(Graphics.frame_rate * 2 / 10)
|
||||
pbWait(0.2)
|
||||
when 0
|
||||
cmd2 = pbMessage(_INTL("Save changes?"),
|
||||
[_INTL("Yes"), _INTL("No"), _INTL("Cancel")], 3)
|
||||
|
||||
@@ -382,11 +382,11 @@ class MapScreenScene
|
||||
end
|
||||
|
||||
def onClick(mapid, x, y)
|
||||
if @lastclick > 0 && Graphics.frame_count - @lastclick < Graphics.frame_rate * 0.5
|
||||
if @lastclick > 0 && System.uptime - @lastclick <= 0.5
|
||||
onDoubleClick(mapid)
|
||||
@lastclick = -1
|
||||
else
|
||||
@lastclick = Graphics.frame_count
|
||||
@lastclick = System.uptime
|
||||
if mapid >= 0
|
||||
@dragging = true
|
||||
@dragmapid = mapid
|
||||
|
||||
@@ -248,7 +248,7 @@ class SpritePositioner
|
||||
@sprites["info"].visible = true
|
||||
ret = false
|
||||
loop do
|
||||
sprite.visible = (Graphics.frame_count % 16) < 12 # Flash the selected sprite
|
||||
sprite.visible = ((System.uptime * 8).to_i % 4) < 3 # Flash the selected sprite
|
||||
Graphics.update
|
||||
Input.update
|
||||
self.update
|
||||
|
||||
Reference in New Issue
Block a user