Method: Actor#speed

Defined in:
lib/fantasy/actor.rb

#speedFloat

Note:

The the direction is represented by the @direction attribute

Controls the pixels per second which this Actor will move in the next frame.

Default 0.

Examples:

Set speed

actor = Actor.new("image")
actor.speed = 10

Returns:

  • (Float)

    the actual speed



109
110
111
# File 'lib/fantasy/actor.rb', line 109

def speed
  @speed
end