Original Post
[font="arial, sans-serif"]
I current have an array of 45 enemies..
These enemies are drawn , animated , updated and what have you. When the enemies health = 0 , it dies...
So
The enemy is drawn when this value is true and when false , it dies..
Now how would i check that every enemy is the array has the value of false...
The reason i want to do this is because i want to check the player has killed all the enemies before progressing to the next wave..
As for texture2d clipping... how can i do it?
I have a health bar implemented and it strechs up and down (using a rectangle) depending on the players health..
Rather than stretching it up and down i wish to clip the image or 'crop' the texture...
Ive tried this draw method overload
But it doesnt do anything...
Ive also looked at the scissorrect? but i dont quite understand how to properly use it .
If you could help it would be good!
[/font]
I current have an array of 45 enemies..
These enemies are drawn , animated , updated and what have you. When the enemies health = 0 , it dies...
So
if (aEnemy.enemyHealth <= 0) // if enemy health is equal or below 0 kill the enemy
{
aEnemy.enemyAlive = false;
}The enemy is drawn when this value is true and when false , it dies..
Now how would i check that every enemy is the array has the value of false...
The reason i want to do this is because i want to check the player has killed all the enemies before progressing to the next wave..
As for texture2d clipping... how can i do it?
I have a health bar implemented and it strechs up and down (using a rectangle) depending on the players health..
Rather than stretching it up and down i wish to clip the image or 'crop' the texture...
Ive tried this draw method overload
spriteBatch.Draw(FullSpeedo, new Rectangle(770, 600, FullSpeedo.Width, FullSpeedo.Height), new Rectangle(770, 600, FullSpeedo.Width / 5, FullSpeedo.Height), Color.White);But it doesnt do anything...
Ive also looked at the scissorrect? but i dont quite understand how to properly use it .
If you could help it would be good!
[/font]
