protected override float getCost() { HoverJet jet = controller.GetComponentInChildren <HoverJet> (); if (jet != null) { return(jet.calculatePathCost(routePoints[currentDestination].label)); } return(0); }
protected override float getCost() { HoverJet jet = controller.GetComponentInChildren <HoverJet>(); if (jet != null) { return(jet.calculatePathCost(powerStation)); } return(0f); }
protected override float getCost() { HoverJet jet = controller.GetComponentInChildren <HoverJet> (); if (jet != null) { return(jet.calculatePathCost(dropPoint.label)); } return(0); }
protected override float getCost() { HoverJet jet = controller.GetComponentInChildren <HoverJet>(); if (jet != null) { System.Nullable <Vector3> pos = controller.getLastKnownPosition(parent); if (pos.HasValue) { float cost = jet.calculatePathCost(pos.Value); //Debug.Log("investigate path cost: " + cost); return(cost); } } return(0); }