private int TerrainGCost(Node nodeA, Node nodeB) { return(nodeA.gCost + grid.GetMovementPenalty(nodeB) + GetDistance(nodeA, nodeB)); }