mirror of
https://github.com/DerTyp7/fps-citybuild-unity.git
synced 2025-10-30 12:37:08 +01:00
PathMap Class
+Made the PathMap into a standalone class
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
|
||||
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
@@ -6,12 +8,32 @@ public class PathNode
|
||||
{
|
||||
|
||||
private Vector3 position;
|
||||
public Vector2 index;
|
||||
private float score;
|
||||
public PathNode(Vector3 Pos, float Score) {
|
||||
public Vector2Int index;
|
||||
private float scoreF;
|
||||
private float scoreG;
|
||||
private float scoreH;
|
||||
public List<PathNode> neigbors;
|
||||
private PathMap lowerLevel;
|
||||
|
||||
private PathNode previous;
|
||||
|
||||
public PathNode(Vector3 Pos)
|
||||
{
|
||||
neigbors = new List<PathNode>();
|
||||
position = Pos;
|
||||
score = Score;
|
||||
scoreG = Mathf.Infinity;
|
||||
scoreF = Mathf.Infinity;
|
||||
scoreH = Mathf.Infinity;
|
||||
}
|
||||
|
||||
public void activateNextLevel()
|
||||
{
|
||||
//lowerLevel = new PathMap(30, 30, float width, float height);
|
||||
}
|
||||
|
||||
public Vector3 Position { get => position; set => position = value; }
|
||||
public float Hscore { get => scoreH; set => scoreH = value; }
|
||||
public float Gscore { get => scoreG; set => scoreG = value; }
|
||||
public float Fscore { get => scoreF; set => scoreF = value; }
|
||||
public PathNode Previous { get => previous; set => previous = value; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user