PathBerserker2d
1.0
Platformer pathfinding solution
|
Creates links to interconnect a collection. More...
Public Member Functions | |
void | UpdateMapping () |
Update the mapping for all link instances. Call after link positions have been changed. More... | |
void | SetLinksTraversable (System.Func< Vector2, Vector2, bool > traversableFunc) |
Set link instances to be traversable based on their start and end points. More... | |
Public Member Functions inherited from PathBerserker2d.BaseNavLink | |
float | TravelCosts (Vector2 start, Vector2 goal) |
MUST BE THREAD SAFE! Calculates the cost of traversing from start to goal. More... | |
Additional Inherited Members | |
Public Attributes inherited from PathBerserker2d.BaseNavLink | |
float | Clearance => clearance |
float | AvgWaitTime => avgWaitTime |
float | CostOverride => costOverride |
GameObject | GameObject => gameObject |
int | NavTag => 0 |
float | MaxTraversableDistance => maxTraversableDistance |
Protected Member Functions inherited from PathBerserker2d.BaseNavLink | |
virtual void | OnValidate () |
Protected Attributes inherited from PathBerserker2d.BaseNavLink | |
float | costOverride = -1 |
int | linkType = 1 |
float | clearance = 2 |
int | navTag = 0 |
Pro-version only. | |
float | avgWaitTime = 0 |
float | maxTraversableDistance = 0 |
Properties inherited from PathBerserker2d.BaseNavLink | |
int | LinkType [get] |
Creates links to interconnect a collection.
Consists of a list of points. At runtime a link is generated for each point to connect it with each other point. This is a convenience component. It drastically reduces the amount of work required to setup an elevator or ladder for example.
Otherwise it functions and behaves the same as a NavLink. Reference the documentation for NavLink for further details.
void PathBerserker2d.NavLinkCluster.SetLinksTraversable | ( | System.Func< Vector2, Vector2, bool > | traversableFunc | ) |
Set link instances to be traversable based on their start and end points.
traversableFunc | Determines whether to enable or disable the given link instance. Link instance is given as its start and goal position. |
void PathBerserker2d.NavLinkCluster.UpdateMapping | ( | ) |
Update the mapping for all link instances. Call after link positions have been changed.