Method: Actor#on_jumping_do

Defined in:
lib/fantasy/actor.rb

#on_jumping_doObject

This method is triggered when the Actor starts jumping

Examples:

Change image when jumping

class Player < Actor
  def on_jumping_do
    self.image_name = "jump"
  end
end


525
526
527
# File 'lib/fantasy/actor.rb', line 525

def on_jumping_do
  instance_exec(&@on_jumping_callback) unless @on_jumping_callback.nil?
end