Method: Core::Game::CompositeGoal#update

Defined in:
lib/game/npc/goal.rb

#updateObject



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/game/npc/goal.rb', line 56

def update
  if @state == :progress
    awesome_print(self) if !current
    case current.state
    when :before
      if current.class != MotionGoal
        current.setup
      end
    when :progress
      return
    when :failed
      handle_failed
    when :finished
      advance
    end
  end
end