Module: NuriYuri::DynamicLight
- Defined in:
- docs/4_Systems_951_DynamicLight.rb
Overview
Module managing the dynamic light system for PSDK
Defined Under Namespace
Classes: DynamicLightSprite, ScalableDLS
Constant Summary collapse
- LIGHTS =
Returns List of light The first array component tell if it’s a normal light (:normal, centered on the character) or if it’s a directed light (:direction, in the direction of the character) The second component is the sprite shown under the map (light mask) The third component is the sprite shown in the map viewport for special effect mostly on top of the character.
[[:normal, 'dynamic_light/circle_320'], [:direction, 'dynamic_light/flash_light_mask', 'dynamic_light/flash_light_color'], [:normal, 'dynamic_light/circle_96']]
- ANIMATIONS =
Returns List of light animation, Hash key are opacity: & zoom: (array of value).
[{zoom: [1], opacity: [255]}, {zoom: Array.new(120) { |i| 0.70 + 0.05 * Math.cos(6.28 * i / 120) }, opacity: Array.new(120) { |i| 240 + (15 * Math.cos(6.28 * i / 120)).to_i }}, {zoom: Array.new(120) { |i| 0.95 + 0.05 * Math.cos(6.28 * i / 120) }, opacity: [255]}]
Class Method Summary collapse
-
.add(chara_id, light_type, animation_type = 0, zoom_count = 0, opacity_count = 0, *args, type: DynamicLightSprite) ⇒ Integer
Add a new light to the stack.
-
.clear_stack
Clear the light task.
-
.create_viewport
Create the viewport.
-
.determine_follower_character(chara_id) ⇒ Game_Character, ...
Recursively get to the asked follower and return the result.
-
.dispose_viewport
Dispose the light viewport.
-
.light_sprite(light_id) ⇒ DynamicLightSprite?
Retrieve the light sprite.
-
.load_blendmode
Load the light blend_mode.
-
.on_map_init
Part called when Scene_Map init itself (in order to reload all the lights).
-
.on_soft_reset
Clean everything on soft reset.
-
.register
Register the update task.
-
.start(&block)
Start the dynamic light processing.
-
.start_delay {|dl| ... }
Start delayed to the warp_end process.
-
.started? ⇒ Integer
Tells if the DynamicLight is started and running or not.
-
.stop(from_start = false)
Stop the dynamic light processing.
-
.stop_delay
Stop delayed to the warp_end process.
-
.switch_off(light_id)
Switch a light off.
-
.switch_on(light_id)
Switch a light on.
-
.unregister
Unregister the update task.
-
.update
Update the lights.
-
.viewport ⇒ Viewport
Return the viewport of the DynamicLight system.
Class Method Details
.add(chara_id, light_type, animation_type = 0, zoom_count = 0, opacity_count = 0, *args, type: DynamicLightSprite) ⇒ Integer
Add a new light to the stack
46 47 |
# File 'docs/4_Systems_951_DynamicLight.rb', line 46 def add(chara_id, light_type, animation_type = 0, zoom_count = 0, opacity_count = 0, *args, type: DynamicLightSprite) end |
.clear_stack
Clear the light task
73 74 |
# File 'docs/4_Systems_951_DynamicLight.rb', line 73 def clear_stack end |
.create_viewport
Create the viewport
76 77 |
# File 'docs/4_Systems_951_DynamicLight.rb', line 76 def end |
.determine_follower_character(chara_id) ⇒ Game_Character, ...
Recursively get to the asked follower and return the result
51 52 |
# File 'docs/4_Systems_951_DynamicLight.rb', line 51 def determine_follower_character(chara_id) end |
.dispose_viewport
Dispose the light viewport
79 80 |
# File 'docs/4_Systems_951_DynamicLight.rb', line 79 def end |
.light_sprite(light_id) ⇒ DynamicLightSprite?
Retrieve the light sprite
64 65 |
# File 'docs/4_Systems_951_DynamicLight.rb', line 64 def light_sprite(light_id) end |
.load_blendmode
Load the light blend_mode
82 83 |
# File 'docs/4_Systems_951_DynamicLight.rb', line 82 def load_blendmode end |
.on_map_init
Part called when Scene_Map init itself (in order to reload all the lights)
85 86 |
# File 'docs/4_Systems_951_DynamicLight.rb', line 85 def on_map_init end |
.on_soft_reset
Clean everything on soft reset
92 93 |
# File 'docs/4_Systems_951_DynamicLight.rb', line 92 def on_soft_reset end |
.register
Register the update task
67 68 |
# File 'docs/4_Systems_951_DynamicLight.rb', line 67 def register end |
.start(&block)
Start the dynamic light processing
16 17 |
# File 'docs/4_Systems_951_DynamicLight.rb', line 16 def start(&block) end |
.start_delay {|dl| ... }
Start delayed to the warp_end process
25 26 |
# File 'docs/4_Systems_951_DynamicLight.rb', line 25 def start_delay end |
.started? ⇒ Integer
Tells if the DynamicLight is started and running or not
32 33 |
# File 'docs/4_Systems_951_DynamicLight.rb', line 32 def started? end |
.stop(from_start = false)
Stop the dynamic light processing
20 21 |
# File 'docs/4_Systems_951_DynamicLight.rb', line 20 def stop(from_start = false) end |
.stop_delay
Stop delayed to the warp_end process
28 29 |
# File 'docs/4_Systems_951_DynamicLight.rb', line 28 def stop_delay end |
.switch_off(light_id)
Switch a light off
59 60 |
# File 'docs/4_Systems_951_DynamicLight.rb', line 59 def switch_off(light_id) end |
.switch_on(light_id)
Switch a light on
55 56 |
# File 'docs/4_Systems_951_DynamicLight.rb', line 55 def switch_on(light_id) end |
.unregister
Unregister the update task
70 71 |
# File 'docs/4_Systems_951_DynamicLight.rb', line 70 def unregister end |
.update
Update the lights
35 36 |
# File 'docs/4_Systems_951_DynamicLight.rb', line 35 def update end |
.viewport ⇒ Viewport
Return the viewport of the DynamicLight system
89 90 |
# File 'docs/4_Systems_951_DynamicLight.rb', line 89 def end |