Class: Engine::Components::DirectionLight
- Inherits:
-
Engine::Component
- Object
- Engine::Component
- Engine::Components::DirectionLight
- Defined in:
- lib/engine/components/direction_light.rb
Instance Attribute Summary collapse
-
#colour ⇒ Object
Returns the value of attribute colour.
Attributes inherited from Engine::Component
Class Method Summary collapse
Instance Method Summary collapse
- #destroy! ⇒ Object
-
#initialize(colour: [1.0, 1.0, 1.0]) ⇒ DirectionLight
constructor
A new instance of DirectionLight.
- #start ⇒ Object
Methods inherited from Engine::Component
#_erase!, #destroy, #destroyed?, destroyed_components, erase_destroyed_components, method_added, #renderer?, #set_game_object, #ui_renderer?, #update
Constructor Details
#initialize(colour: [1.0, 1.0, 1.0]) ⇒ DirectionLight
Returns a new instance of DirectionLight.
7 8 9 |
# File 'lib/engine/components/direction_light.rb', line 7 def initialize(colour: [1.0, 1.0, 1.0]) @colour = colour end |
Instance Attribute Details
#colour ⇒ Object
Returns the value of attribute colour.
5 6 7 |
# File 'lib/engine/components/direction_light.rb', line 5 def colour @colour end |
Class Method Details
.direction_lights ⇒ Object
19 20 21 |
# File 'lib/engine/components/direction_light.rb', line 19 def self.direction_lights @direction_lights ||= [] end |
Instance Method Details
#destroy! ⇒ Object
15 16 17 |
# File 'lib/engine/components/direction_light.rb', line 15 def destroy! DirectionLight.direction_lights.delete(self) end |
#start ⇒ Object
11 12 13 |
# File 'lib/engine/components/direction_light.rb', line 11 def start DirectionLight.direction_lights << self end |