Class: Moonbirdie::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?



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

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-24x24.png",
                                         "#{Pixelart::Module::Moonbirds.root}/config/spritesheet-24x24.csv",
                                          width:  24,
                                          height: 24 )
end

.find_by(name:) ⇒ Object

return archetype/attribute image by name



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

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