Class: RuGUI::BaseImageSprite

Inherits:
Object
  • Object
show all
Includes:
Rubygame::Sprites::Sprite
Defined in:
lib/rugui/framework_adapters/Rubygame.rb

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ BaseImageSprite

Returns a new instance of BaseImageSprite.



224
225
226
227
228
229
230
231
# File 'lib/rugui/framework_adapters/Rubygame.rb', line 224

def initialize(name)
  @groups = []
  @depth = 0

  @image = Rubygame::Surface[name]
  @image.set_colorkey(@image.get_at([0, 0]))
  @rect = @image.make_rect
end