Module: BattleUI::PlayerChoiceAbstraction
Overview
Abstraction helping to design player choice a way that complies to what Visual expect to handle
Instance Attribute Summary collapse
-
#action ⇒ Battle::Actions::Base
readonly
The possible action made by the player (other than choosing a sub action).
-
#index ⇒ Integer
readonly
Get the index.
-
#result ⇒ Symbol?
readonly
The result :attack, :bag, :pokemon, :flee, :cancel, :try_next, :action.
Instance Method Summary collapse
-
#reset(can_switch)
Reset the choice.
-
#use_item(item)
Force the action to use an item.
-
#validated? ⇒ Boolean
If the player made a choice.
Instance Attribute Details
#action ⇒ Battle::Actions::Base (readonly)
The possible action made by the player (other than choosing a sub action)
426 427 428 |
# File 'docs/5_Battle_01_Scene.rb', line 426 def action @action end |
#index ⇒ Integer (readonly)
Get the index
429 430 431 |
# File 'docs/5_Battle_01_Scene.rb', line 429 def index @index end |
#result ⇒ Symbol? (readonly)
The result :attack, :bag, :pokemon, :flee, :cancel, :try_next, :action
423 424 425 |
# File 'docs/5_Battle_01_Scene.rb', line 423 def result @result end |
Instance Method Details
#reset(can_switch)
Reset the choice
432 433 |
# File 'docs/5_Battle_01_Scene.rb', line 432 def reset(can_switch) end |
#use_item(item)
Force the action to use an item
440 441 |
# File 'docs/5_Battle_01_Scene.rb', line 440 def use_item(item) end |
#validated? ⇒ Boolean
If the player made a choice
436 437 |
# File 'docs/5_Battle_01_Scene.rb', line 436 def validated? end |