booldeactivated=false;//A deactivated bullet no longer interacts with the world. It's just a visual.
booldeactivated=false;//A deactivated bullet no longer interacts with the world. It's just a visual.
floatfadeOutTime=0;
floatfadeOutTime=0;//Setting the fade out time causes the bullet's lifetime to be set to the fadeout time as well, as that's when the bullet's alpha will reach 0, so it dies.
boolfriendly=false;//Whether or not it's a player bullet or enemy bullet.
boolfriendly=false;//Whether or not it's a player bullet or enemy bullet.
boolupperLevel=false;
boolupperLevel=false;
private:
protected:
floatfadeOutTimer=0;
floatfadeOutTimer=0;
private:
voidUpdateFadeTime(floatfElapsedTime);
voidUpdateFadeTime(floatfElapsedTime);
public:
public:
Animate2D::Animation<AnimationState>animation;
Animate2D::Animation<AnimationState>animation;
@ -38,6 +39,6 @@ public:
//Return true when the bullet should be destroyed. Return false to handle it otherwise (like deactivating it instead). You become responsible for getting rid of the bullet.
//Return true when the bullet should be destroyed. Return false to handle it otherwise (like deactivating it instead). You become responsible for getting rid of the bullet.
vf2dmovementVelocity={};//This tells us if the player is moving (mostly controlled by user input) since their velocity is not used for regular movement.