Class: UI::Hall_of_Fame::Turning_Pokeball
- Inherits:
-
Sprite
- Object
- LiteRGSS::Disposable
- LiteRGSS::Drawable
- LiteRGSS::Sprite
- LiteRGSS::ShaderedSprite
- Sprite
- UI::Hall_of_Fame::Turning_Pokeball
- Defined in:
- scripts/01450 Systems/00300 Hall of fame/00002 UI/00020 Turning_Pokeball.rb
Overview
Class that define the turning Pokeball
Instance Attribute Summary
Attributes inherited from LiteRGSS::ShaderedSprite
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
-
#bitmap_filename ⇒ String
The base filename of the image.
-
#initialize(viewport) ⇒ Turning_Pokeball
constructor
Initialize the Sprite.
-
#new_origin ⇒ Array<Integer>
The new origin of the Sprite.
-
#update_anim
Update the angle of the ball.
Methods inherited from Sprite
#load, #mouse_in?, #set_origin_div, #set_rect, #set_rect_div, #set_z, #simple_mouse_in?, #translate_mouse_coords, #update
Methods inherited from LiteRGSS::Sprite
new, #set_origin, #set_position
Methods inherited from LiteRGSS::Disposable
Constructor Details
#initialize(viewport) ⇒ Turning_Pokeball
Initialize the Sprite
7 8 9 10 11 12 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00020 Turning_Pokeball.rb', line 7 def initialize() super() set_bitmap(bitmap_filename, :interface) set_origin(*new_origin) self.opacity = 0 end |
Instance Method Details
#bitmap_filename ⇒ String
The base filename of the image
16 17 18 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00020 Turning_Pokeball.rb', line 16 def bitmap_filename return 'hall_of_fame/ball' end |
#new_origin ⇒ Array<Integer>
The new origin of the Sprite
22 23 24 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00020 Turning_Pokeball.rb', line 22 def new_origin return 228, 228 end |
#update_anim
Update the angle of the ball
27 28 29 30 |
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00020 Turning_Pokeball.rb', line 27 def update_anim self.angle += 1 self.angle = 0 if angle == 360 end |