/// <summary> Returns the coordinates of the current tile. This default /// implementation assumes no-tiling, so (0,0) is returned. /// /// </summary> /// <param name="co">If not null this object is used to return the information. If /// null a new one is created and returned. /// /// </param> /// <returns> The current tile's coordinates. /// /// </returns> public virtual Coord getTile(Coord co) { if (co != null) { co.x = 0; co.y = 0; return co; } else { return new Coord(0, 0); } }
/// <summary> Returns the number of tiles in the horizontal and vertical /// directions. This default implementation assumes no tiling, so (1,1) is /// always returned. /// /// </summary> /// <param name="co">If not null this object is used to return the information. If /// null a new one is created and returned. /// /// </param> /// <returns> The number of tiles in the horizontal (Coord.x) and vertical /// (Coord.y) directions. /// /// </returns> public virtual Coord getNumTiles(Coord co) { if (co != null) { co.x = 1; co.y = 1; return co; } else { return new Coord(1, 1); } }