Class: SDC::MapLayer
- Inherits:
-
Object
- Object
- SDC::MapLayer
- Defined in:
- engine_docs/automatic_doc_MapLayer.rb,
lib/core/Map.rb,
engine_docs/automatic_doc_MapLayer.rb
Overview
Single layer of a map
Instance Attribute Summary collapse
-
#collision_active ⇒ Boolean
Tests collisions if set to true.
-
#tileset ⇒ Tileset
The tileset of the map.
-
#z ⇒ Object
Returns the value of attribute z.
Instance Method Summary collapse
-
#[](x, y) ⇒ Tile
Gives the tile at the given indices on the map.
-
#initialize(width, height, view_width, view_height, tile_width, tile_height) ⇒ MapLayer
constructor
Creates a map layer with given size, the view field size and the tile size.
-
#link_tileset(tileset) ⇒ nil
Links the given tileset to the map layer.
-
#load_test_map ⇒ nil
Loads a simple test map.
-
#reload ⇒ true
Reloads the map.
Constructor Details
#initialize(width, height, view_width, view_height, tile_width, tile_height) ⇒ MapLayer
Creates a map layer with given size, the view field size and the tile size
|
# File 'engine_docs/automatic_doc_MapLayer.rb', line 9
|
Instance Attribute Details
#collision_active ⇒ Boolean
Tests collisions if set to true
|
# File 'engine_docs/automatic_doc_MapLayer.rb', line 36
|
#z ⇒ Object
Returns the value of attribute z.
3 4 5 |
# File 'lib/core/Map.rb', line 3 def z @z end |
Instance Method Details
#[](x, y) ⇒ Tile
Gives the tile at the given indices on the map
|
# File 'engine_docs/automatic_doc_MapLayer.rb', line 40
|
#link_tileset(tileset) ⇒ nil
Links the given tileset to the map layer
|
# File 'engine_docs/automatic_doc_MapLayer.rb', line 30
|
#load_test_map ⇒ nil
Loads a simple test map
|
# File 'engine_docs/automatic_doc_MapLayer.rb', line 25
|
#reload ⇒ true
Reloads the map
|
# File 'engine_docs/automatic_doc_MapLayer.rb', line 20
|