42 void input()
override;
Controls the behavior of ranged weapons such as bows or guns.
bool m_shoot
Flag to indicate whether the weapon should shoot.
RangedWeaponScript()
Constructs a RangedWeaponScript with default or initial settings.
void input() override
Processes input to handle shooting actions.
int m_lastFireTimeInMs
Timestamp of the last shooting action in milliseconds.
bool m_animationPlayed
Ensures that the shooting animation plays correctly.
void update() override
Updates the state of the weapon based on input and time constraints.
int m_fireRatePerSecond
Allowed number of shots per second to control shooting frequency.
Base class for scripting custom behaviors in game objects.
Defines the Script class for attaching behavior to game objects.