Class: Flonkerton::Tiles

Inherits:
Resource show all
Defined in:
lib/flonkerton.rb

Class Method Summary collapse

Methods inherited from Resource

[], all

Class Method Details

.load(game) ⇒ Object



115
116
117
118
119
120
121
# File 'lib/flonkerton.rb', line 115

def self.load(game)
  Dir[path].each do |file|
    if File.basename(file) =~ /(\w+)_(\d+)x(\d+)/
      all[$1.intern] = Image.load_tiles(game, file, $2.to_i, $3.to_i, true)
    end
  end
end