mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
Code tidying with Rubocop
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
class Sprite_SurfBase
|
||||
attr_reader :visible
|
||||
attr_reader :visible
|
||||
|
||||
def initialize(parent_sprite, viewport = nil)
|
||||
@parent_sprite = parent_sprite
|
||||
|
||||
@@ -44,7 +44,8 @@ class Spriteset_Map
|
||||
@@viewport3 = Viewport.new(0, 0, Settings::SCREEN_WIDTH, Settings::SCREEN_HEIGHT) # Flashing
|
||||
@@viewport3.z = 500
|
||||
|
||||
def self.viewport # For access by Spriteset_Global
|
||||
# For access by Spriteset_Global.
|
||||
def self.viewport
|
||||
return @@viewport1
|
||||
end
|
||||
|
||||
|
||||
@@ -105,7 +105,8 @@ class Sprite_Shadow < RPG::Sprite
|
||||
end
|
||||
end
|
||||
|
||||
def in_range?(element, object, range) # From Near's Anti Lag Script, edited
|
||||
# From Near's Anti Lag Script, edited.
|
||||
def in_range?(element, object, range)
|
||||
elemScreenX = ScreenPosHelper.pbScreenX(element)
|
||||
elemScreenY = ScreenPosHelper.pbScreenY(element)
|
||||
objScreenX = ScreenPosHelper.pbScreenX(object)
|
||||
|
||||
@@ -53,8 +53,8 @@ def getCubicPoint2(src, t)
|
||||
y1 = src[7]
|
||||
|
||||
x1 = cx1 + ((x1 - cx1) * t)
|
||||
x0 = x0 + ((cx0 - x0) * t)
|
||||
cx0 = cx0 + ((cx1 - cx0) * t)
|
||||
x0 += ((cx0 - x0) * t)
|
||||
cx0 += ((cx1 - cx0) * t)
|
||||
cx1 = cx0 + ((x1 - cx0) * t)
|
||||
cx0 = x0 + ((cx0 - x0) * t)
|
||||
cx = cx0 + ((cx1 - cx0) * t)
|
||||
@@ -64,8 +64,8 @@ def getCubicPoint2(src, t)
|
||||
# d = x0
|
||||
# cx = a*t*t*t + b*t*t + c*t + d
|
||||
y1 = cy1 + ((y1 - cy1) * t)
|
||||
y0 = y0 + ((cy0 - y0) * t)
|
||||
cy0 = cy0 + ((cy1 - cy0) * t)
|
||||
y0 += ((cy0 - y0) * t)
|
||||
cy0 += ((cy1 - cy0) * t)
|
||||
cy1 = cy0 + ((y1 - cy0) * t)
|
||||
cy0 = y0 + ((cy0 - y0) * t)
|
||||
cy = cy0 + ((cy1 - cy0) * t)
|
||||
|
||||
Reference in New Issue
Block a user