Method: Actor#on_jumping

Defined in:
lib/fantasy/actor.rb

#on_jumping(&block) ⇒ Object

The block to be executed when the Actor starts jumping

Examples:

Change image when jumping

actor = Actor.new("walk")
actor.on_jumping do
  actor.image_name = "jump"
end


459
460
461
# File 'lib/fantasy/actor.rb', line 459

def on_jumping(&block)
  @on_jumping_callback = block
end