This module defines constants representing different types of tiles in a grid-based game. The tile types include EMPTY, SPAWN, BASE, and WALKABLE. Each tile type is represented by a unique integer value. These constants are used to identify the nature of each tile in the game world, allowing for efficient game logic and rendering.
PropertiesName | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
TILE_TYPES | Object | An object containing constants for each tile type.Properties
|
- Source
Methods
(static) isWalkableTile(tile) → {boolean}
This function checks if the given tile type is within the range of walkable tiles. It returns true for SPAWN, BASE, and WALKABLE tiles, and false for EMPTY tiles.
Parameters:
Name | Type | Description |
---|---|---|
tile | number | The tile type to check. |
- Source
Returns:
- Returns true if the tile is walkable, false otherwise.
- Type:
- boolean