Class: Core::Game::MotionGoal
Instance Attribute Summary collapse
-
#dx ⇒ Object
readonly
Returns the value of attribute dx.
-
#dy ⇒ Object
readonly
Returns the value of attribute dy.
-
#state ⇒ Object
Returns the value of attribute state.
-
#x ⇒ Object
readonly
Returns the value of attribute x.
-
#y ⇒ Object
readonly
Returns the value of attribute y.
Instance Method Summary collapse
-
#initialize(dx, dy, x, y) ⇒ MotionGoal
constructor
A new instance of MotionGoal.
- #recalc ⇒ Object
Methods inherited from Goal
Constructor Details
#initialize(dx, dy, x, y) ⇒ MotionGoal
Returns a new instance of MotionGoal.
27 28 29 30 31 |
# File 'lib/game/npc/goal.rb', line 27 def initialize(dx, dy, x, y) super() @dx, @dy = dx, dy @x, @y = x, y end |
Instance Attribute Details
#dx ⇒ Object (readonly)
Returns the value of attribute dx.
25 26 27 |
# File 'lib/game/npc/goal.rb', line 25 def dx @dx end |
#dy ⇒ Object (readonly)
Returns the value of attribute dy.
25 26 27 |
# File 'lib/game/npc/goal.rb', line 25 def dy @dy end |
#state ⇒ Object
Returns the value of attribute state.
26 27 28 |
# File 'lib/game/npc/goal.rb', line 26 def state @state end |
#x ⇒ Object (readonly)
Returns the value of attribute x.
25 26 27 |
# File 'lib/game/npc/goal.rb', line 25 def x @x end |
#y ⇒ Object (readonly)
Returns the value of attribute y.
25 26 27 |
# File 'lib/game/npc/goal.rb', line 25 def y @y end |
Instance Method Details
#recalc ⇒ Object
32 33 34 |
# File 'lib/game/npc/goal.rb', line 32 def recalc @state = :recalc end |