Class: Goblin::Spritesheet

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

Class Method Summary collapse

Class Method Details

.builtinObject



14
15
16
17
18
19
# File 'lib/goblins.rb', line 14

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

.find_by(name:) ⇒ Object

note: for now class used for “namespace” only



21
22
23
# File 'lib/goblins.rb', line 21

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