public override void SetUpReference() { base.SetUpReference(); IGlidingTarget glider = gliderAdaptor.GetGlidingTarget(); thisGliderWaypointsFollower.SetGlider(glider); }
void DrawGlidingTargetsByWaypointCurve(Rect rect) { if (thisSystemIsReady) { IGlidingTargetSpawnPoint[] spawnPoints = CollectGlidingTargetSpawnPoints(); string result = ""; foreach (IGlidingTargetSpawnPoint spawnPoint in spawnPoints) { IGlidingTarget target = (IGlidingTarget)spawnPoint.GetSpawnedTarget(); result += "point #" + spawnPoint.GetIndex().ToString() + ": " ; if (target == null) { result += "null"; } else { result += "target# " + target.GetIndex().ToString(); } result += "\n"; } GUI.Label( rect, result ); } }
protected override void ExecuteImple( IWaypointsFollower follower ) { if (follower.GetCurrentWaypointCurve() == thisDeactivateGliderWaypointEventAdaptor.GetThisGlidingTargetWaypointCurve()) { IGliderWaypointsFollower gliderWaypointsFollower = (IGliderWaypointsFollower)follower; IGlidingTarget glider = gliderWaypointsFollower.GetGlider(); glider.Deactivate(); } }
public void SetGlider(IGlidingTarget target) { thisGlider = target; }