Removed global state for LightManager and ObjectManager, they're now inside GameState. Simplified terrain mesh.

This commit is contained in:
2019-02-07 10:05:43 -06:00
parent 2f0cb47ed8
commit f4a81f1e36
16 changed files with 28104 additions and 144520 deletions

View File

@@ -4,7 +4,9 @@ class IMICFPS
include GLU
attr_reader :bounding_boxes, :vertex_count
def initialize
def initialize(game_state:)
@game_state = game_state
@bounding_boxes = {}
@vertex_count = 0
end
@@ -215,7 +217,7 @@ class IMICFPS
glPopMatrix
found = ObjectManager.objects.detect { |o| o == bounding_box[:object] }
found = @game_state.game_objects.detect { |o| o == bounding_box[:object] }
unless found
@vertex_count -= @bounding_boxes[key][:vertices_size]