Ran rubocop autocorrect

This commit is contained in:
2020-12-02 17:37:48 -06:00
parent aa30ff73d0
commit 95bea199ed
116 changed files with 758 additions and 575 deletions

View File

@@ -1,4 +1,5 @@
# frozen_string_literal: true
class IMICFPS
class PhysicsManager
def initialize(collision_manager:)
@@ -16,7 +17,7 @@ class IMICFPS
end
def resolve(entity, other)
entity.velocity.y = other.velocity.y if other.velocity.y < entity.velocity.y && entity.velocity.y < 0
entity.velocity.y = other.velocity.y if other.velocity.y < entity.velocity.y && entity.velocity.y.negative?
end
def simulate
@@ -33,9 +34,9 @@ class IMICFPS
entity.velocity.y = 0
else
entity.velocity.y -= @collision_manager.map.gravity * entity.delta_time if entity.manifest.physics
entity.velocity.y = 0 if entity.velocity.y < 0
entity.velocity.y = 0 if entity.velocity.y.negative?
end
end
end
end
end
end