Alright,
today I worked really hard on some other stuff, but now I need to get the enemies moving. I did what I would usually do on moving stuff, to get the enemies moving. So, this is what I did. First off, I changed my Drawing function for the enemies. It now looks like the following:
DrawEnemy(int sourcew, int sourceh, int x, int y, float XVel);
That way, I can manage each of the enemies x velocity right when I draw them, without each and everysingle enemy having the same velocity. That would get very repetive. Also, inside the DrawEnemy function I do this now.
XVelEnemy=XVel;
Next, I added a function inside my enemyclass that now updates the destination of the enemy. The function looks like this in my enemy.cpp file:
void Enemy::UpdateEnemy(){ enemyDest.x-=XVelEnemy;}
So that should update the destination to move towards the main character as far as I am concerned.
Finally, how I call update in my main function. I do it as follows:
for(int i = 0; i<10; i++){ enemy.UpdateEnemy();}
So, as far as I am aware this illiterates through the loop 9 times, and each of the enemies should be updated per frame. Am I right, or is my logic plain wrong?
I am sorry for asking for this much help, and I know I shouldn't since I need to learn from my own mistakes. I usually fix my own problems, but this is not making any since to me at all! Also, I am sure there is something that might be missing and I am just dumb enough to miss it, to make the whole thing wrong.
So, thanks to all who help!
Also, I am initing all the velocities to 2.
Chad.