Class: Water

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

Overview

class Water

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) ⇒ Water

Returns a new instance of Water.



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

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

Instance Method Details

#updateObject



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

def update
  @sprite.update
end