-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
479 onboarding azim #652
479 onboarding azim #652
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a few bad patterns I found which you should check.
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Missing newline at end of file! Files should always end with a single newline character.
} | |
} | |
This bad pattern was detected by the following regular expression:
.*
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are several compile errors. Make sure your code compiles before submitting a pull request. That is the least you should do.
namespace SEE.Controls.Actions | ||
{ | ||
/// <summary> | ||
/// Action to create a new node for a selected city. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation is wrong. Looks like a copy & paste error.
{ | ||
/// <summary> | ||
/// If the user clicks with the mouse hitting a game object representing a graph node, | ||
/// this graph node is a parent to which a new node is created and added as a child. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This documentation is misleading. The term node should refer only to graph nodes or game objects representing graph nodes. Do you mean a marker instead?
GameObject parent = raycastHit.collider.gameObject; | ||
Vector3 position = parent.transform.position; | ||
Vector3 scale = parent.transform.lossyScale; | ||
addedSphere = GameNodeMarker.AddSphere(parent, position: position, worldSpaceScale: scale); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why passing position and scale as parameters? Couldn't GameNodeMarker.AddSphere
retrieve these?
addedSphere = GameNodeMarker.AddSphere(parent, position: position, worldSpaceScale: scale); | ||
// addedSphere has the scale and position of Vector3. | ||
// The position at which the parent was hit will be the center point of the addedSphere. | ||
momento = new Momento(parent, position: position, scale: scale); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be memento
not momento
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is even a compiler error. Do not check-in code that does not compile!
// The position at which the parent was hit will be the center point of the addedSphere. | ||
momento = new Momento(parent, position: position, scale: scale); | ||
memento.NodeID = addedSphere.name; | ||
new MarkNetAction(parentID: memento.Parent.name, memento.Position, memento.Scale).Execute(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above, no need for the position and scale parameters.
return new HashSet<string> | ||
{ | ||
memento.Parent.name, | ||
memento.NodeID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above, a marker is not a node.
namespace SEE.Game.SceneManipulation | ||
{ | ||
|
||
public static class GameNodeMarker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation is missing.
public static GameObject NodeMarker(GameObject parent, Vector3 position, Vector3 worldSpaceScale) | ||
{ | ||
GameObject sphere = GameObject.CreatePrimitive(PrimitiveType.Sphere); | ||
Vector3 position = parent.transofrm.position; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in transofrm
leading to a compile error. Do not check-in code that does not compile!
// Getter size and position of sphere. | ||
float coords = Math.Min(scale.x, scale.y); | ||
Vector3 size = new Vector3(coords, coords, coords); | ||
Vector3 position = new Vector3(position.x, position.y + scale.y, position.z); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will not work when there is an antenna or any other kind of decoration above the game object. As hinted in the issue description, you should use GetTop()
.
namespace SEE.Net.Actions | ||
{ | ||
/// <summary> | ||
/// This class is responsible for adding a node via network from one client to all others and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not adding, but marking.
PR was only for the onboarding task. The onboarding task will not be merged. |
No description provided.