Module: BattleUI::MultiplePosition
- Included in:
- AbilityBar, InfoBar, PokemonSprite, TrainerPartyBalls, TrainerSprite
- Defined in:
- docs/5_Battle_01_Scene.rb
Overview
Module helping to position any sprite that can get several positions depending on the battle mode
All class including this module should define the following methods
- `scene` that returns the current Battle Scene
- `position` that returns the position of the current object in its bank (0, 1, 2, ...)
- `bank` that returns the bank of the current object (0 = ally, 1 = enemies)
- `base_position_v1` that returns the base position of the object in 1v1 battles
- `base_position_v2` that returns the base position of the object in 2v2+ battles
- `offset_position_v2` that returns the offset of the object depending on its bank (this offset is multiplied to position)
This module will define a ‘sprite_position` function that will compute the x & y position this element should get
Instance Method Summary collapse
-
#enemy? ⇒ Boolean
Tell if the sprite is from the enemy side.
Instance Method Details
#enemy? ⇒ Boolean
Tell if the sprite is from the enemy side
374 375 |
# File 'docs/5_Battle_01_Scene.rb', line 374 def enemy? end |