Class: RuneRb::Game::Entity::Commands::Graphic

Inherits:
RuneRb::Game::Entity::Command show all
Defined in:
app/game/entity/commands/graphic.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

Since:

  • 0.9.3


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

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

  @assets[:context].update(:graphic, RuneRb::Game::Entity::Graphic.new(@assets[:command][0].to_i,
                                                                 @assets[:command][1].to_i || 100,
                                                                 @assets[:command][2].to_i || 0))
end