Skip to content

Commit 05aa1f1

Browse files
authored
Update README.md
1 parent a32a4e8 commit 05aa1f1

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,23 @@ You can got to Assets->Create->Map Settings from the toolbar
4848

4949
![Toolbar](https://i.imgur.com/DshzBGv.png)
5050

51+
### How to call functions from MapFunctions.cs
52+
53+
The good thing about the MapFunctions.cs script is that you can take it out of this project and put it into any other project.
54+
If you want to call functions from the script you would just need to do the following:
55+
56+
```csharp
57+
int[,] map;
58+
map = MapFunctions.GenerateArray(width, height, empty);
59+
map = MapFunctions.PerlinNoise(map, seed);
60+
MapFunctions.RenderMap(map, tilemap, tile);
61+
```
62+
63+
What this code would do is:
64+
1. Create an int array for a map
65+
2. Generate the array into the map
66+
3. Generate perlin noise within the map
67+
4. Render the map to a tilemap
5168

5269
**Software Requirements**
5370

0 commit comments

Comments
 (0)