Added event handler for :entity_moved, added door script, various tweaks

This commit is contained in:
2019-09-26 16:19:01 -05:00
parent f7936b38bc
commit 8df05eda13
11 changed files with 43 additions and 14 deletions

View File

@@ -36,7 +36,6 @@ class IMICFPS
@physics = @manifest.physics # Entity affected by gravity and what not
@mass = 100 # kg
@delta_time = Gosu.milliseconds
@last_position = Vector.new(@position.x, @position.y, @position.z)
load_scripts
@@ -110,11 +109,13 @@ class IMICFPS
def update
model.update
@delta_time = Gosu.milliseconds
unless at_same_position?
Publisher.instance.publish(:entity_moved, self, self)
@bounding_box = normalize_bounding_box_with_offset if model
end
@last_position = Vector.new(@position.x, @position.y, @position.z)
end
def debug_color=(color)