Class: RPG::Sprite
- Inherits:
-
Sprite
show all
- Defined in:
- docs/0_Dependencies.rb,
docs/5_Battle_99_Pokemon_Script_Project.rb
Constant Summary
collapse
- SHADER =
"uniform sampler2D texture;\nuniform float hue;\n\n// Source: https://gist.github.com/mairod/a75e7b44f68110e1576d77419d608786\nvec3 hueShift( vec3 color, float hueAdjust ) {\n\n const vec3 kRGBToYPrime = vec3 (0.299, 0.587, 0.114);\n const vec3 kRGBToI = vec3 (0.596, -0.275, -0.321);\n const vec3 kRGBToQ = vec3 (0.212, -0.523, 0.311);\n\n const vec3 kYIQToR = vec3 (1.0, 0.956, 0.621);\n const vec3 kYIQToG = vec3 (1.0, -0.272, -0.647);\n const vec3 kYIQToB = vec3 (1.0, -1.107, 1.704);\n\n float YPrime = dot (color, kRGBToYPrime);\n float I = dot (color, kRGBToI);\n float Q = dot (color, kRGBToQ);\n float hue = atan (Q, I);\n float chroma = sqrt (I * I + Q * Q);\n\n hue += hueAdjust;\n\n Q = chroma * sin (hue);\n I = chroma * cos (hue);\n\n vec3 yIQ = vec3 (YPrime, I, Q);\n\n return vec3( dot (yIQ, kYIQToR), dot (yIQ, kYIQToG), dot (yIQ, kYIQToB) );\n}\n\nvoid main() {\n vec4 color = texture2D(texture, gl_TexCoord[0].xy);\n color.rgb = hueShift(color.rgb, hue);\n gl_FragColor = color * gl_Color;\n}\n"
- @@_animations =
[]
- @@_reference_count =
{}
Instance Attribute Summary collapse
-
#blend_type
Returns the value of attribute blend_type.
-
#bush_depth
Returns the value of attribute bush_depth.
-
#color
Returns the value of attribute color.
-
#tone
Returns the value of attribute tone.
#blendmode, #shader
#__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
new, #set_origin, #set_position
#disposed?
Constructor Details
#initialize(viewport = nil) ⇒ Sprite
Returns a new instance of Sprite.
2367
2368
|
# File 'docs/0_Dependencies.rb', line 2367
def initialize(viewport = nil)
end
|
Instance Attribute Details
#blend_type
Returns the value of attribute blend_type.
2355
2356
2357
|
# File 'docs/0_Dependencies.rb', line 2355
def blend_type
@blend_type
end
|
#bush_depth
Returns the value of attribute bush_depth.
2356
2357
2358
|
# File 'docs/0_Dependencies.rb', line 2356
def bush_depth
@bush_depth
end
|
#color
Returns the value of attribute color.
2358
2359
2360
|
# File 'docs/0_Dependencies.rb', line 2358
def color
@color
end
|
#tone
Returns the value of attribute tone.
2357
2358
2359
|
# File 'docs/0_Dependencies.rb', line 2357
def tone
@tone
end
|
Instance Method Details
#animation(animation, hit, reverse = false)
2381
2382
|
# File 'docs/0_Dependencies.rb', line 2381
def animation(animation, hit)
end
|
#animation_process_timing(timing, hit)
2407
2408
|
# File 'docs/0_Dependencies.rb', line 2407
def animation_process_timing(timing, hit)
end
|
#animation_set_sprites(sprites, cell_data, position)
2405
2406
|
# File 'docs/0_Dependencies.rb', line 2405
def animation_set_sprites(sprites, cell_data, position)
end
|
#appear
2373
2374
|
# File 'docs/0_Dependencies.rb', line 2373
def appear
end
|
#blink? ⇒ Boolean
2395
2396
|
# File 'docs/0_Dependencies.rb', line 2395
def blink?
end
|
#blink_off
2393
2394
|
# File 'docs/0_Dependencies.rb', line 2393
def blink_off
end
|
#blink_on
2391
2392
|
# File 'docs/0_Dependencies.rb', line 2391
def blink_on
end
|
#collapse
2377
2378
|
# File 'docs/0_Dependencies.rb', line 2377
def collapse
end
|
#damage(value, critical)
2379
2380
|
# File 'docs/0_Dependencies.rb', line 2379
def damage(value, critical)
end
|
#dispose
2369
2370
|
# File 'docs/0_Dependencies.rb', line 2369
def dispose
end
|
#dispose_animation
2387
2388
|
# File 'docs/0_Dependencies.rb', line 2387
def dispose_animation
end
|
#dispose_damage
2385
2386
|
# File 'docs/0_Dependencies.rb', line 2385
def dispose_damage
end
|
#dispose_loop_animation
2389
2390
|
# File 'docs/0_Dependencies.rb', line 2389
def dispose_loop_animation
end
|
#effect? ⇒ Boolean
2397
2398
|
# File 'docs/0_Dependencies.rb', line 2397
def effect?
end
|
#escape
2375
2376
|
# File 'docs/0_Dependencies.rb', line 2375
def escape
end
|
#flash(color, duration)
2359
2360
|
# File 'docs/0_Dependencies.rb', line 2359
def flash(*args)
end
|
#handle_flash
24
25
|
# File 'docs/5_Battle_99_Pokemon_Script_Project.rb', line 24
def handle_flash
end
|
#loop_animation(animation)
2383
2384
|
# File 'docs/0_Dependencies.rb', line 2383
def loop_animation(animation)
end
|
#register_position
12
13
|
# File 'docs/5_Battle_99_Pokemon_Script_Project.rb', line 12
def register_position
end
|
#reset_position
14
15
|
# File 'docs/5_Battle_99_Pokemon_Script_Project.rb', line 14
def reset_position
end
|
#update
2399
2400
|
# File 'docs/0_Dependencies.rb', line 2399
def update
end
|
#update_animation
2401
2402
|
# File 'docs/0_Dependencies.rb', line 2401
def update_animation
end
|
#update_loop_animation
2403
2404
|
# File 'docs/0_Dependencies.rb', line 2403
def update_loop_animation
end
|
#whiten
2371
2372
|
# File 'docs/0_Dependencies.rb', line 2371
def whiten
end
|
#x=(x)
2409
2410
|
# File 'docs/0_Dependencies.rb', line 2409
def x=(x)
end
|
#y=(y)
2411
2412
|
# File 'docs/0_Dependencies.rb', line 2411
def y=(y)
end
|