Skip to content

Conversation

angeloaf20
Copy link

Added the RemoveChild method to the ObjectTransform class so that when a child node detaches from its parent, the child is removed from the parent's Children vector as well.

Also added an example in main.cpp.

Copy link
Contributor

@JeffM2501 JeffM2501 left a comment

Choose a reason for hiding this comment

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

Please see comments

@@ -32,6 +32,7 @@
#include "object_transform.h"

#include <vector>
#include <iostream>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is iostream needed?

Comment on lines +71 to +72


Copy link
Contributor

Choose a reason for hiding this comment

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

Why two extra spaces?

Comment on lines +98 to +100
if (IsKeyPressed(KEY_SPACE))
GunNode.Detach();

Copy link
Contributor

Choose a reason for hiding this comment

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

Probably should tell the user what the keys do now that there is more than one

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.

2 participants