Class: GGLib::MapImage

Inherits:
Animation show all
Defined in:
lib/image.rb

Constant Summary collapse

BuildingSpriteRoot =
"img/sprites/map/buildings/"
ItemSpriteRoot =
"img/sprites/map/items/"
TerrainSpriteRoot =
"img/sprites/map/terrain/"
Animation =
true
Image =
false

Instance Attribute Summary

Attributes inherited from Animation

#animObj, #height, #loop, #name, #speed, #src, #width

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Animation

#data, #del, deleteAllAnimations, #done, #restart

Constructor Details

#initialize(name, src) ⇒ MapImage

Returns a new instance of MapImage.



85
86
87
88
# File 'lib/image.rb', line 85

def initialize(name,src,speed,width,height,loop=true)
  src=subVars(src)
  super
end

Class Method Details

.get(at) ⇒ Object



103
104
105
# File 'lib/image.rb', line 103

def MapImage.get(at)
  return Animation.get(at)
end

Instance Method Details

#draw(x, y, z) ⇒ Object



96
97
98
99
100
101
102
# File 'lib/image.rb', line 96

def draw(x,y,z)
  if Animation
    super
  else
    @animObj.draw(x,y,z)
  end
end