Class: UI::ThrowingBaitMudSprite

Inherits:
SpriteSheet show all
Defined in:
docs/4_Systems_000_General_4_UI_Generics.rb

Overview

Sprite responsive of showing the sprite of the bait or mud we throw at a Pokemon

Instance Attribute Summary

Attributes inherited from SpriteSheet

#nb_x, #nb_y, #sx, #sy

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 SpriteSheet

#bitmap=, #resize, #select

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

#set_origin, #set_position

Methods inherited from LiteRGSS::Disposable

#dispose, #disposed?

Constructor Details

#initialize(viewport, bait_mud) ⇒ ThrowingBaitMudSprite

Create a new ThrowingBaitMudSprite

Parameters:

  • viewport (Viewport)
  • bait_mud (Symbol) —

    :bait or :mud, depending on the player's choice



992
993
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 992

def initialize(viewport, bait_mud)
end

Instance Method Details

#offset_y ⇒ Integer

Get the offset y in order to make it the same position as the Pokemon sprite

Returns:

  • (Integer)


1000
1001
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1000

def offset_y
end

#throw_progression=(progression)

Function that adjust the sy depending on the progression of the "throw" animation

Parameters:

  • progression (Float)


996
997
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 996

def throw_progression=(progression)
end

#trainer_offset ⇒ Integer

Get the offset y in order to make it look like being in trainer's hand

Returns:

  • (Integer)


1004
1005
# File 'docs/4_Systems_000_General_4_UI_Generics.rb', line 1004

def trainer_offset
end