I have a, probably simple, problem.
What I'm trying to accomplish is creating a class object named Player, which will handle all player code (of course).
So basically, I've created this Player class to have a vector (array) which has a total size of 8. This vector will have IAnimatedMeshSceneNode*'s with the player's Head, Body, Feet, Hands, etc.
So vector[0] is the skeleton, vector[1] is the head, vector[2] is the body, and so on.
Like a class with this vector array:
Code: Select all
class Player {
public:
std::vector<IAnimatedMeshSceneNode*> playerNodes;
}
Code: Select all
std::vector<Player*> player;
//...
player.push_back(new Player());
player.push_back(new Player());
I cannot make the playerNodes vector variable private, because I need it to be accessible by other classes.
I assumed this was because I was using a pointer for IAnimatedMeshSceneNode* but I don't think it's possible to do otherwise.
Is there a way I can have two Player objects, without the playerNodes variables "interfering"?
I've also tried looking at the playerNodes size, and it seems to be 8*<Amount of players created> (in this case, 16 total) when it should only be 8 per player.
I tried explaining this problem as well as I could.
Thanks for the help!