mirror of
				https://github.com/DerTyp7/fps-citybuild-unity.git
				synced 2025-10-31 05:07:08 +01:00 
			
		
		
		
	 5770d41a0c
			
		
	
	5770d41a0c
	
	
	
		
			
			This adds the PathNode class and the PathMap class which generates a path for a NPC to follow to a desired position.
		
			
				
	
	
		
			18 lines
		
	
	
		
			381 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			381 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System.Collections;
 | |
| using System.Collections.Generic;
 | |
| using UnityEngine;
 | |
| 
 | |
| public class PathNode
 | |
| {
 | |
| 
 | |
|     private Vector3 position;
 | |
|     public Vector2 index;
 | |
|     private float score;
 | |
|     public PathNode(Vector3 Pos, float Score) {
 | |
| 
 | |
|         position = Pos;
 | |
|         score = Score;
 | |
|     }
 | |
|     public Vector3 Position { get => position; set => position = value; }
 | |
| }
 |