mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-15 15:42:35 +00:00
Fixed crash when jumping
This commit is contained in:
@@ -134,7 +134,7 @@ class IMICFPS
|
|||||||
end
|
end
|
||||||
|
|
||||||
def jump
|
def jump
|
||||||
if InputMapper.down?(:jump) && window.current_state.collision_manager.on_ground?(self)
|
if InputMapper.down?(:jump) && window.current_state.map.collision_manager.on_ground?(self)
|
||||||
@velocity.y = 1.5
|
@velocity.y = 1.5
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ class IMICFPS
|
|||||||
include EntityManager
|
include EntityManager
|
||||||
include LightManager
|
include LightManager
|
||||||
|
|
||||||
|
attr_reader :collision_manager
|
||||||
attr_reader :gravity
|
attr_reader :gravity
|
||||||
def initialize(map_loader:, gravity: IMICFPS::GRAVITY)
|
def initialize(map_loader:, gravity: IMICFPS::GRAVITY)
|
||||||
@map_loader = map_loader
|
@map_loader = map_loader
|
||||||
|
|||||||
Reference in New Issue
Block a user