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

Inherits:
RuneRb::Game::Entity::Command show all
Defined in:
app/game/entity/commands/animation.rb

Overview

Since:

  • 0.9.3

Instance Method Summary collapse

Methods inherited from RuneRb::Game::Entity::Command

#initialize

Methods included from System::Log

#class_name, #err, #err!, #log, #log!, #symbolize_file

Constructor Details

This class inherits a constructor from RuneRb::Game::Entity::Command

Instance Method Details

#executeObject

Executes the ::anim command.

Since:

  • 0.9.3


5
6
7
8
9
# File 'app/game/entity/commands/animation.rb', line 5

def execute
  return unless @assets[:command].length >= 1

  @assets[:context].update(:animation, animation: RuneRb::Game::Entity::Animation.new(@assets[:command][0].to_i, @assets[:command][1].to_i || 0))
end