| 1 | == area(parentArea) == |
| 2 | This is the constructor. It recieves the parent area because each area is required to be within another area. |
| 3 | == setSize(min, max) == |
| 4 | This method sets the size of the area. The size is restricted between 0 to 1. |
| 5 | == getSize() == |
| 6 | This method returns the size of the area. |
| 7 | == setLoc(x, y) == |
| 8 | This method defines where the area will be placed. X and Y is restricted between 0 to 1. |
| 9 | == getLoc() == |
| 10 | This method returns the location of the area in an array: array(x,y). |
| 11 | == getCenter() == |
| 12 | This method returns the center of the area in an array: array(x,y). |
| 13 | == getRandom() == |
| 14 | This method returns a random location within the area in an array: array(x,y). |
| 15 | == setCluster(min, max) == |
| 16 | This method sets the number of area patches (Blob in AOM) to create. |
| 17 | == setClusterDist(min, max) == |
| 18 | This method sets the allowed distance the patches can be from eachother. Distance is restricted between 0 to 1. |
| 19 | == setRadius(int) == |
| 20 | This method sets the radius of an area to create a circle. |
| 21 | == newVertex(x, y) == |
| 22 | This method defines coordinates for a vertex to create a polygon. |
| 23 | == rotate(int) == |
| 24 | This method is used to rotate the area by a certain amount of degrees (1-359). |
| 25 | == preventWalk() == |
| 26 | This method prevents units from entering the area. |
| 27 | == preventBuild() == |
| 28 | This method prevents players from building on the area. |
| 29 | == create() == |
| 30 | This method registers the area after everything has been configured. |