Class: Cyberpunk::Spritesheet

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

Class Method Summary collapse

Class Method Details

.builtinObject



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

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

.find_by(name:) ⇒ Object

note: for now class used for “namespace” only



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

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