Class: Lilgoblin::Spritesheet

Inherits:
Object
  • Object
show all
Defined in:
lib/goblins.rb

Class Method Summary collapse

Class Method Details

.builtinObject



55
56
57
58
59
60
# File 'lib/goblins.rb', line 55

def self.builtin
  @builtin ||= Pixelart::Spritesheet.read(  "#{Pixelart::Module::Goblins.root}/config/spritesheet-20x20.png",
                                            "#{Pixelart::Module::Goblins.root}/config/spritesheet-20x20.csv",
                                             width:  20,
                                             height: 20 )
end

.find_by(name:) ⇒ Object

note: for now class used for “namespace” only



62
63
64
# File 'lib/goblins.rb', line 62

def self.find_by( name: )  ## return archetype/attribute image by name
   builtin.find_by( name: name )
end