Simple Graph Editor

Code reference



Waypoint


Properties
Type Name Description
List<WaypointPercent> outs Outgoing edges of this waypoint
List<Waypoint> ins Incoming edges of this waypoint

Methods
Return type Definition Description
Waypoint getNextWaypoint() Returns a random waypoint based on the probabilty defined in the WaypointPercent class
void setSame() Sets the same probabilities to choose each path to the same for each WaypointPercent in the outs list (100% in total)
void linkTo(Waypoint) Links this waypoint (directionally) with the passed waypoint and sets the probabilities of all edges to the same value
void unlinkFrom(Waypoint) Removes a link (directionally) between this waypoiny and the passed waypoint and sets the probabilities of all edges to the same value


WaypointPercent


Properties
Type Name Description
int probability Probability of choosing this edge, from 0 to 100
Waypoint waypoint The waypoint this edge is linked to

Constructors
Definition Description
WaypointPercent(Waypoint) Initializes a new instance of this class setting a waypoint as destination


WaypointCluster


Properties
Type Name Description
List<Waypoint> waypoints List of ALL waypoints inside the cluster

Methods
Return type Definition Description
Waypoint CreateWaypoint(Vector3) Creates a new waypoint inside this cluster. This is the correct way of creating new waypoints at runtime.

Sitemap

home
contact

Social




Copyright © 2016-2019 Eric Mourin