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

@@ -1,25 +1,24 @@
class IMICFPS
class LightManager
module LightManager
MAX_LIGHTS = OpenGL::GL_MAX_LIGHTS
LIGHTS = []
def self.add_light(model)
LIGHTS << model
def add_light(model)
@lights << model
end
def self.find_light()
def find_light()
end
def self.lights
LIGHTS
def lights
@lights
end
def self.light_count
LIGHTS.count+1
def light_count
@lights.count+1
end
def self.clear_lights
LIGHTS.clear
def clear_lights
@lights.clear
end
end
end

View File

@@ -4,17 +4,19 @@ class IMICFPS
Point = Struct.new(:x, :y)
Color = Struct.new(:red, :green, :blue, :alpha)
class ObjectManager
OBJECTS = []
def self.add_object(model)
OBJECTS << model
module ObjectManager # Get included into GameState context
def add_object(model)
@game_objects << model
end
def self.find_object()
def find_object()
end
def self.objects
OBJECTS
def remove_object()
end
def game_objects
@game_objects
end
end
end