Class: RuneRb::Game::Entity::Animation

Inherits:
Object
  • Object
show all
Defined in:
app/game/entity/models/animation.rb

Overview

A Animation that is performed by an Entity

Since:

  • 0.9.3

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, delay) ⇒ Animation

Called when a new Animation is created.

Parameters:

  • id (Integer)

    the ID for the animation

  • delay (Integer)

    the delay before the animation should be played.

Since:

  • 0.9.3


14
15
16
17
# File 'app/game/entity/models/animation.rb', line 14

def initialize(id, delay)
  @id = id
  @delay = delay
end

Instance Attribute Details

#delayObject (readonly)

The delay before the animation should occur.

Since:

  • 0.9.3


9
10
11
# File 'app/game/entity/models/animation.rb', line 9

def delay
  @delay
end

#idObject (readonly)

The ID for the animation

Since:

  • 0.9.3


6
7
8
# File 'app/game/entity/models/animation.rb', line 6

def id
  @id
end