GetWeight() public method

public GetWeight ( IntVector3 p ) : int
p IntVector3
return int
Exemplo n.º 1
0
            ushort IAStarTarget.GetCostBetween(IntVector3 src, IntVector3 dst)
            {
                ushort cost = (src - dst).ManhattanLength == 1 ? (ushort)COST_STRAIGHT : (ushort)COST_DIAGONAL;

                cost += (ushort)m_env.GetWeight(dst);
                return(cost);
            }