Class: Bush

Inherits:
GameObject show all
Defined in:
lib/entities/bush.rb

Overview

class Bush

Instance Attribute Summary

Attributes inherited from GameObject

#collider, #x, #y

Instance Method Summary collapse

Methods inherited from GameObject

#collide?, #collision_detect, #done?, #draw, #hitted, #solid?

Constructor Details

#initialize(x, y) ⇒ Bush

Returns a new instance of Bush.



5
6
7
8
# File 'lib/entities/bush.rb', line 5

def initialize(x, y)
  super(x, y, 2, 2, false)
  @sprite = Sprite.new(:bush, false)
end

Instance Method Details

#updateObject



10
11
12
# File 'lib/entities/bush.rb', line 10

def update
  @sprite.update
end