Class: NuriYuri::DynamicLight::ScalableDLS

Inherits:
DynamicLightSprite show all
Defined in:
docs/02000_Nuri_Yuri.rb

Overview

Sprite that simulate the dynamic light and can be scaled

Constant Summary

Constants inherited from DynamicLightSprite

DynamicLightSprite::DIRECTION_OFFSET, DynamicLightSprite::NORMAL_OFFSET, DynamicLightSprite::TILE_ZOOM

Instance Attribute Summary

Attributes inherited from DynamicLightSprite

#light_id

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 DynamicLightSprite

#dispose, #visible=

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

#dispose, #disposed?

Constructor Details

#initialize(character, light_type, animation_type = 0, zoom_count = 0, opacity_count = 0, init_scale = 1) ⇒ ScalableDLS

Create a new ScalableDynamicLightSprite

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

  • init_scale (Numeric) (defaults to: 1)

    initial scale of the object



157
158
# File 'docs/02000_Nuri_Yuri.rb', line 157

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

Instance Method Details

#scaleNumeric

Retrieve the current scale of the sprite (without the animation effect)

Returns:

  • (Numeric)


165
166
# File 'docs/02000_Nuri_Yuri.rb', line 165

def scale
end

#scale_to(target_scale, duration = 0)

Tell the sprite to scale

Parameters:

  • target_scale (Numeric)

    target value the sprite should scale

  • duration (Integer) (defaults to: 0)

    number of frame the sprite should take to scale



173
174
# File 'docs/02000_Nuri_Yuri.rb', line 173

def scale_to(target_scale, duration = 0)
end

#update

Update the sprite



168
169
# File 'docs/02000_Nuri_Yuri.rb', line 168

def update
end

#zoom=(value)

Change the zoom of the sprite

Parameters:

  • value (Numeric)

    New zoom



161
162
# File 'docs/02000_Nuri_Yuri.rb', line 161

def zoom=(value)
end