Class: Zyps::FaceAction
Overview
Head toward a target.
Instance Attribute Summary
Attributes inherited from Action
Instance Method Summary collapse
-
#do(actor, targets) ⇒ Object
Set the actor’s heading to point directly at first target.
Methods inherited from Action
#copy, #initialize, #start, #started?, #stop
Constructor Details
This class inherits a constructor from Zyps::Action
Instance Method Details
#do(actor, targets) ⇒ Object
Set the actor’s heading to point directly at first target.
68 69 70 |
# File 'lib/zyps/actions.rb', line 68 def do(actor, targets) actor.vector.pitch = Utility.find_angle(actor.location, targets[0].location) end |