mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-15 23:52:35 +00:00
Removed global state for LightManager and ObjectManager, they're now inside GameState. Simplified terrain mesh.
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user