hi all
im new to xna
so im just writing on my first game.
so for now i made a "bomb" class, wichs draws my bomb and checks for collision between the bomb and a jeep.
if there is one, the current bombstate changes to "jeeephit"
//update
if (aCurrentbombstate == bombstate.jeephit)
{
if (!justonce)
{
thetime = (float)theGameTime.ElapsedGameTime.TotalSeconds;
justonce = true;
}
showntime = (float)theGameTime.ElapsedGameTime.TotalSeconds - thetime;
propertime = Convert.ToInt32(showntime);
...
//draw
if (aCurrentbombstate == bombstate.hit)
{
if (propertime <= 3)
{
base.mSpriteTexture = wragtexture;
base.Scale = 0.8f;
base.Source = new Rectangle(0, 0, wragtexture.Width, wragtexture.Height);
base.Draw(theSpriteBatch);
}
}
and displays , on the last known vector2 of the bomb, a "damaged jeep". 3 seconds later the damaged jeep should disappear, but he doesn't
can someone please help me, i dont want the damaged jeep to stay there for ever!!