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,14 +1,12 @@
# frozen_string_literal: true
class IMICFPS
# A game object is any renderable thing
class Entity
include CommonMethods
attr_accessor :visible, :renderable, :backface_culling
attr_accessor :position, :orientation, :scale, :velocity
attr_reader :name, :debug_color, :bounding_box, :drag, :camera, :manifest, :model
attr_accessor :visible, :renderable, :backface_culling, :position, :orientation, :scale, :velocity, :debug_color
attr_reader :name, :bounding_box, :drag, :camera, :manifest, :model
def initialize(manifest:, map_entity: nil, spawnpoint: nil, backface_culling: true, run_scripts: true)
@manifest = manifest
@@ -54,7 +52,7 @@ class IMICFPS
@camera = nil
return self
self
end
def load_scripts
@@ -94,7 +92,6 @@ class IMICFPS
def draw
end
def update
unless at_same_position?
Publisher.instance.publish(:entity_moved, nil, self)
@@ -104,10 +101,6 @@ class IMICFPS
@last_position = Vector.new(@position.x, @position.y, @position.z)
end
def debug_color=(color)
@debug_color = color
end
def at_same_position?
@position == @last_position
end