Class: NuriYuri::DynamicLight::DynamicLightSprite

Inherits:
Sprite show all
Defined in:
docs/4_Systems_951_DynamicLight.rb

Overview

Sprite that simulate the dynamic light

Direct Known Subclasses

ScalableDLS

Constant Summary collapse

DIRECTION_OFFSET =

Offset of the light in :direction mode

-12
# Offset of the light in other modes
NORMAL_OFFSET =

Offset of the light in other modes

-8
# Zoom of a tile to process coodinate properly
TILE_ZOOM =

Zoom of a tile to process coodinate properly

Configs.display.tilemap_settings.character_tile_zoom

Instance Attribute Summary collapse

Attributes inherited from LiteRGSS::ShaderedSprite

#blendmode, #shader

Attributes inherited from LiteRGSS::Sprite

#__index__, #angle, #bitmap, #height, #mirror, #opacity, #ox, #oy, #src_rect, #viewport, #visible, #width, #x, #y, #z, #zoom, #zoom_x, #zoom_y

Instance Method Summary collapse

Methods inherited from Sprite

#load, #mouse_in?, #set_origin_div, #set_rect, #set_rect_div, #set_z, #simple_mouse_in?, #translate_mouse_coords

Methods inherited from LiteRGSS::Sprite

new, #set_origin, #set_position

Methods inherited from LiteRGSS::Disposable

#disposed?

Constructor Details

#initialize(character, light_type, animation_type = 0, zoom_count = 0, opacity_count = 0) ⇒ DynamicLightSprite

Create a new DynamicLightSprite

Parameters:

  • character (Game_Character)
  • light_type (Integer)

    Type of the light we’ll display on the character

  • animation_type (Integer) (defaults to: 0)

    Type of the animation performed on the light

  • zoom_count (Integer) (defaults to: 0)

    initial value of the zoom_count

  • opacity_count (Integer) (defaults to: 0)

    initial value of the opacity_count



118
119
# File 'docs/4_Systems_951_DynamicLight.rb', line 118

def initialize(character, light_type, animation_type = 0, zoom_count = 0, opacity_count = 0)
end

Instance Attribute Details

#light_idInteger

Returns ID of the light in the stack.

Returns:

  • (Integer)

    ID of the light in the stack



111
112
113
# File 'docs/4_Systems_951_DynamicLight.rb', line 111

def light_id
  @light_id
end

Instance Method Details

#dispose

Dispose the sprite



129
130
# File 'docs/4_Systems_951_DynamicLight.rb', line 129

def dispose
end

#update

Update the sprite



121
122
# File 'docs/4_Systems_951_DynamicLight.rb', line 121

def update
end

#visible=(value) Also known as: on=

Change the sprite visibility

Parameters:

  • value (Boolean)


126
127
# File 'docs/4_Systems_951_DynamicLight.rb', line 126

def visible=(value)
end