Pathfinding.LayerGridGraph.UpdatePenalty C# (CSharp) Method

UpdatePenalty() public method

public UpdatePenalty ( LevelGridNode node ) : void
node LevelGridNode
return void
		public virtual void UpdatePenalty (LevelGridNode node) {
			
			node.Penalty = 0;//Mathf.RoundToInt (Random.value*100);
			node.Penalty = initialPenalty;
			
			if (penaltyPosition) {
				node.Penalty += (uint)Mathf.RoundToInt ((node.position.y-penaltyPositionOffset)*penaltyPositionFactor);
			}
		}