mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Fixed overworld weather fading out/in when walking between maps with the same weather, added support for Sprite coordinates being floats
This commit is contained in:
@@ -338,3 +338,34 @@ module RPG
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# A modification to class Sprite that allows its coordinates to be floats rather
|
||||
# than integers.
|
||||
#===============================================================================
|
||||
class Sprite
|
||||
attr_accessor :float
|
||||
|
||||
alias :__float__x :x
|
||||
alias :__float__y :y
|
||||
alias :__float__x_equals :x=
|
||||
alias :__float__y_equals :y=
|
||||
|
||||
def x
|
||||
return (@float) ? @real_x : __float__x
|
||||
end
|
||||
|
||||
def y
|
||||
return (@float) ? @real_y : __float__y
|
||||
end
|
||||
|
||||
def x=(value)
|
||||
@real_x = value if @float
|
||||
__float__x_equals(value)
|
||||
end
|
||||
|
||||
def y=(value)
|
||||
@real_y = value if @float
|
||||
__float__y_equals(value)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user