Class: Dedalus::ImageRepository

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

Class Method Summary collapse

Class Method Details

.lookup(path) ⇒ Object



3
4
5
6
7
# File 'lib/dedalus/image_repository.rb', line 3

def self.lookup(path)
  @images ||= {}
  @images[path] ||= Gosu::Image.new(path)
  @images[path]
end

.lookup_tiles(path, width, height) ⇒ Object



9
10
11
12
13
# File 'lib/dedalus/image_repository.rb', line 9

def self.lookup_tiles(path, width, height)
  @tiles ||= {}
  @tiles[path] ||= Gosu::Image::load_tiles(path, width, height)
  @tiles[path]
end