Class: Tmap::Tile

Inherits:
Object
  • Object
show all
Defined in:
lib/tmap/tile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, picture_id, collidable) ⇒ Tile

Returns a new instance of Tile.



5
6
7
8
9
# File 'lib/tmap/tile.rb', line 5

def initialize(name, picture_id, collidable)
  @name = name
  @picture_id = picture_id
  @collidable = collidable
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/tmap/tile.rb', line 3

def name
  @name
end

#picture_idObject (readonly)

Returns the value of attribute picture_id.



3
4
5
# File 'lib/tmap/tile.rb', line 3

def picture_id
  @picture_id
end

Instance Method Details

#collide?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/tmap/tile.rb', line 11

def collide?
  @collidable
end