| return
|
function
|
description
|
|
|
addPath(SceneNode island1, Vec3 localIslandPosition1, SceneNode island2, Vec3 localIslandPosition2)
|
Add a protected path that can't be built ower.
|
|
|
addProtectedPoint(SceneNode island, Vec3 localIslandPosition)
|
Add a protected point where nothinge can be built.
|
|
|
addProtectedLine(SceneNode island, Vec3 point1, Vec3 point2)
|
Add a protected Line on witch no tower can be built.
|
|
|
addProtectedLine(SceneNode island, Line3D localLine)
|
Add a protected Line on witch no tower can be built.
|
| bool
|
tryToSnapBuildingInToPlace(SceneNode building, SceneNode collisionNode, Vec3 global pos, float yRotation)
|
|
| bool
|
removeBuilding(SceneNode buildNode)
|
|
| Island
|
getTargetIsland()
|
|
| Matrix
|
getLocalIslandMatrix()
|
|
| SceneNode
|
TryToBuild()
|
Return the buildings SceneNode when the building is built else return nil.
|
| bool
|
activatePathRender()
|
|
| bool
|
clearBuildings()
|
Try to remove all buildings from the BuildNode. Return true if all buildings was successfully removed.
|
| bool
|
sellBuilding(SceneNode buildingNode)
|
Try to sell a building from the BuildNode. Return true if the building was successfully removed.
|
| {SceneNode()}
|
getBuildingList()
|
|
| SceneNode
|
getBuldingFromLine(Line3D line)
|
|
| SceneNode
|
getNearestBuildingFromLine(Line3D line)
|
Return the nearest building from the given line. return nil when there is no tower created.
|
| Matrix
|
getCurrentGlobalTowerMatrix()
|
|
| { }
|
getBuildInfo()
|
This function can only be called after a building has been placed. Returns a table with information to build the tower again in the same location.
|
| SceneNode
|
buildFromBuildInfo(SceneNode building, table buildInfo)
|
Return the buildings SceneNode when the building is built else return nil. buildInfo is the table created by the getBuildInfo() function.
|
| { { island=Island(), position=Vec3()} }
|
getProtectedPoints()
|
This function return all protected points. in following format { {island=Island(),position=Vec3()}, ... }
|
| { { { island=Island(), position=Vec3()} } }
|
getProtectedLines()
|
This function return all protected lines. in following format { { {island=Island(),position=Vec3()}, {island=Island(),position=Vec3()} }, ... }, allLines(line(p1, p2))
|
| { { { island=Island(), position=Vec3()} } }
|
getProtectedPaths()
|
This function return all protected paths. in following format { { {island=Island(),position=Vec3()}, {island=Island(),position=Vec3()} }, ... }, allLines(line(p1, p2))
|