Class: Punkxl::Spritesheet

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

Class Method Summary collapse

Class Method Details

.builtinObject



6
7
8
9
10
11
# File 'lib/punks/punks_xl.rb', line 6

def self.builtin
  @builtin ||= Pixelart::Spritesheet.read(  "#{Pixelart::Module::Punks.root}/config/punks_xl-32x32.png",
                                            "#{Pixelart::Module::Punks.root}/config/punks_xl-32x32.csv",
                                            width:  32,
                                            height: 32 )
end

.find_by(name:) ⇒ Object

note: for now class used for “namespace” only



14
15
16
# File 'lib/punks/punks_xl.rb', line 14

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