mirror of
				https://github.com/DerTyp7/fps-citybuild-unity.git
				synced 2025-10-31 05:07:08 +01:00 
			
		
		
		
	Add files via upload
This adds the PathNode class and the PathMap class which generates a path for a NPC to follow to a desired position.
This commit is contained in:
		
							
								
								
									
										17
									
								
								Assets/Scripts/PathGenerator.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								Assets/Scripts/PathGenerator.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | ||||
| 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; } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 juliuse98
					juliuse98