Method: GameObject#initialize

Defined in:
lib/entities/game_object.rb

#initialize(object_pool, x, y) ⇒ GameObject

Returns a new instance of GameObject.



3
4
5
6
7
8
9
# File 'lib/entities/game_object.rb', line 3

def initialize(object_pool, x, y)
  @x, @y = x, y
  @location = [x, y]
  @components = []
  @object_pool = object_pool
  @object_pool.add(self)
end