Class: PowerupGraphics

Inherits:
Component show all
Defined in:
lib/entities/components/powerup_graphics.rb

Instance Attribute Summary

Attributes inherited from Component

#object

Instance Method Summary collapse

Methods inherited from Component

#update

Constructor Details

#initialize(object, type) ⇒ PowerupGraphics

Returns a new instance of PowerupGraphics.



2
3
4
5
# File 'lib/entities/components/powerup_graphics.rb', line 2

def initialize(object, type)
  super(object)
  @type = type
end

Instance Method Details

#draw(viewport) ⇒ Object



7
8
9
10
# File 'lib/entities/components/powerup_graphics.rb', line 7

def draw(viewport)
  image.draw(x - 12, y - 12, 1)
  Utils.mark_corners(object.box) if $debug
end