Skip to content

Robber planner#28

Open
norman-derek wants to merge 13 commits into
mainfrom
robberPlanner
Open

Robber planner#28
norman-derek wants to merge 13 commits into
mainfrom
robberPlanner

Conversation

@norman-derek

Copy link
Copy Markdown
Member

No description provided.

@norman-derek
norman-derek requested a review from vpham1897 March 5, 2025 19:47
@norman-derek norman-derek self-assigned this Mar 5, 2025
public Transform CustomDestination;

protected Transform CustomDestination;
public GameObject destinationPrefab;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note where custom destinations are expected to be coming from.

// protected DestinationPlanner planner;

protected string endpoint;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note intended use case for Awake()

I can only really guess that it's a function that sets it to be able to move, but why is it turned off to begin with?

move = true;
CustomDestination = Instantiate(destinationPrefab).transform;

// CustomDestination = Instantiate(destinationPrefab, Vector3.zero, Quaternion.identity).transform;

@vpham1897 vpham1897 Mar 5, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove commented out code if it serves no function, and if it serves function, please note as such what the function is if it's not obvious like a debug.log.

protected CopDestinationPlanner planner;
Rigidbody rigidbody;

private string endpoint = "cop";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this variable used? it doesn't look like it?



/*
This function returns the Vector3 position of the current robber vehicle

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, is this comment correct? The function implementation and the function name seem to imply it's getting where the robber is going?

}


Vector3 GetFurthestNavMeshPoint(Vector3 startPos, float maxDist)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is directly attached to the robber and the robber is the only one to use this function, why have startPos and not just code in this.transform.position?

[SerializeField] private GameObject copCarPrefab;
[SerializeField] private GameObject[] carModelPrefabChoices;

private void Start() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this, from my understanding, ensures there's exactly one object running BIntersectionManager

@vpham1897 vpham1897 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a bunch of bits that should be deleted (namely use of comments to delete old code) and comments regarding helpful information I'd like, but overall looks good.

Merge changes from main into robberPlanner branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants