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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user