Method: Core::Game::Combat::GUI#update

Defined in:
lib/game/combat/gui.rb

#updateObject



50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/game/combat/gui.rb', line 50

def update
  @w.each_value { |w|
    w.update
    if w.remove?
      @w.delete(@w.key(w))
    end
  }
  @add.each do |k, v|
    @w.store(k, v)
  end
  @add = {}
  w = @w[:select_spell]
  if w and w.selected
    @choose = lambda { cast(w.actor, @chosen, w.selected) }
  end
  if @choose and @chosen
    @choose.call
  end
end