Class: Moonbird::Spritesheet

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

Overview

note: for now class used for “namespace” only

Class Method Summary collapse

Class Method Details

.builtinObject

check: use a different name e.g. default,standard,base or such - why? why not?



15
16
17
18
19
20
# File 'lib/moonbirds.rb', line 15

def self.builtin    ### check: use a different name e.g. default,standard,base or such - why? why not?
  @sheet ||= Pixelart::Spritesheet.read( "#{Pixelart::Module::Moonbirds.root}/config/spritesheet-42x42.png",
                                         "#{Pixelart::Module::Moonbirds.root}/config/spritesheet-42x42.csv",
                                          width:  42,
                                          height: 42 )
end

.find_by(name:) ⇒ Object

return archetype/attribute image by name



22
23
24
# File 'lib/moonbirds.rb', line 22

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