Method: Core::Game::Combat::Behaviour#initialize
- Defined in:
- lib/game/combat/battle.rb
#initialize(hash) ⇒ Behaviour
Returns a new instance of Behaviour.
41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/game/combat/battle.rb', line 41 def initialize(hash) @actions = {} hash.each { |k, v| i = 0 v.each { |action| if !@actions[k] @actions.store(k, {}) end @actions[k].store(i, action) i += 1 } } end |