floatfadeOutTime=0.f;//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.
boolupperLevel=false;
boolalwaysOnTop=false;
floatz=0.f;
floatimage_angle=0.f;
protected:
floatdistanceTraveled=0.f;
vf2dscale={1,1};
floatfadeInTime=0;//Setting the fade in time causes the bullet to be disabled and the bullet's alpha will fade in from zero to the actual alpha of the bullet. When the fade in timer reaches the fade in time automatically, the bullet will be enabled.
booldead=false;//When marked as dead it wil be removed by the next frame.
boolsimulated=false;//A simulated bullet cannot interact / damage things in the world. It's simply used for simulating the trajectory and potential path of the bullet
floatiframeTimerOnHit{0.f};
boolplayerAutoAttackProjectile=false;//Set to true for bullets that are auto attack projectiles to identify them.
void_Draw()const;
BulletTypetype{BulletType::UNDEFINED};
booldeactivated{false};
doublealiveTime{};
floatonContactFadeoutTime{};//What fadeouttime will be set to when the bullet hits a monster.
std::optional<std::string>hitSound;
protected:
floatdrawOffsetY{};
BulletDestroyState_PlayerHit(Player*player);//Return true to destroy the bullet on hit, return false otherwise. THE BULLET HIT HAS ALREADY OCCURRED.
BulletDestroyState_MonsterHit(Monster&monster,constuint8_tmarkStacksBeforeHit);//Return true to destroy the bullet on hit, return false otherwise. THE BULLET HIT HAS ALREADY OCCURRED.
//Used by special bullets to control custom despawning behavior! 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.
//DO NOT CALL THIS DIRECTLY! INSTEAD USE _PlayerHit()!!
//Used by special bullets to control custom despawning behavior! 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.
//DO NOT CALL THIS DIRECTLY! INSTEAD USE _MonsterHit()!!