/// <summary> /// Places the given chunk type at the given position and orients it. /// </summary> /// <param name="in_type">The new chunk type to set.</param> /// <param name="in_orientation">The orientation to set.</param> /// <param name="in_position">The position at which to set it.</param> /// <returns><c>true</c> if the position was valid, <c>false</c> otherwise.</returns> public bool SetChunk(ChunkType in_type, ChunkOrientation in_orientation, Point in_position) { var valid = IsValidPosition(in_position); if (valid) { _chunkTypes[in_position.Y, in_position.X] = in_type; _chunkOrientations[in_position.Y, in_position.X] = in_orientation; } return valid; }
/// <summary> /// Places the given chunk type at the given position and orients it. /// </summary> /// <param name="in_type">The new chunk type to set.</param> /// <param name="in_orientation">The orientation to set.</param> /// <param name="in_position">The position at which to set it.</param> /// <returns><c>true</c> if the position was valid, <c>false</c> otherwise.</returns> public bool SetChunk(ChunkType in_type, ChunkOrientation in_orientation, Vector2Int in_position) { var valid = IsValidPosition(in_position); if (valid) { _chunkTypes[in_position.X, in_position.Y] = in_type; _chunkOrientations[in_position.X, in_position.Y] = in_orientation; } return(valid); }