Guys what is wrong with the position of node
This is the two pieces of faulty code, public Vector3 Position; and Position = a_Pos; .unexpected symbol position and public in class struct or interface member declaration
this is the full code:
using System.Collections; using System.Collections.Generic; using UnityEngine;
public class Node {
public int gridX;
public int gridY;
public bool IsObstacle
public Vector3 Position;
public Node Parent;
public int gCost;
public int hCost;
public int FCost {get{return gCost + hCost;}}
public Node (bool a_IsObstacle, Vector3 a_Pos, int a_gridX, int a_gridY)
{
IsObstacle = a_IsObstacle
Position = a_Pos;
gridX = a_gridX;
gridY = a_gridY;
}
}
Help :"(
Comment
Your answer
Follow this Question
Related Questions
Make shader from Blender nodes 0 Answers
Pathfinding Set Up In Unity2D 0 Answers
GUI label apears on it self,I have a GUI lable. The text apears on it self. 0 Answers
Node Based AI,Node Based AI System? 0 Answers
Snap object to the local grid. 1 Answer