Ejemplo n.º 1
0
    protected override float getCost()
    {
        HoverJet jet = controller.GetComponentInChildren <HoverJet> ();

        if (jet != null)
        {
            return(jet.calculatePathCost(routePoints[currentDestination].label));
        }
        return(0);
    }
Ejemplo n.º 2
0
    protected override float getCost()
    {
        HoverJet jet = controller.GetComponentInChildren <HoverJet>();

        if (jet != null)
        {
            return(jet.calculatePathCost(powerStation));
        }
        return(0f);
    }
Ejemplo n.º 3
0
    protected override float getCost()
    {
        HoverJet jet = controller.GetComponentInChildren <HoverJet> ();

        if (jet != null)
        {
            return(jet.calculatePathCost(dropPoint.label));
        }
        return(0);
    }
Ejemplo n.º 4
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);
    }