Class: UI::Hall_of_Fame::Turning_Pokeball

Inherits:
Sprite show all
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

#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, #update

Methods inherited from LiteRGSS::Sprite

new, #set_origin, #set_position

Methods inherited from LiteRGSS::Disposable

#dispose, #disposed?

Constructor Details

#initialize(viewport) ⇒ Turning_Pokeball

Initialize the Sprite

Parameters:



7
8
9
10
11
12
# File 'scripts/01450 Systems/00300 Hall of fame/00002 UI/00020 Turning_Pokeball.rb', line 7

def initialize(viewport)
  super(viewport)
  set_bitmap(bitmap_filename, :interface)
  set_origin(*new_origin)
  self.opacity = 0
end

Instance Method Details

#bitmap_filenameString

The base filename of the image

Returns:



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_originArray<Integer>

The new origin of the Sprite

Returns:



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