| 1 | /* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */ |
| 2 | /* If you are missing that file, acquire a complete release at teeworlds.com. */ |
| 3 | #ifndef GAME_CLIENT_COMPONENTS_EFFECTS_H |
| 4 | #define GAME_CLIENT_COMPONENTS_EFFECTS_H |
| 5 | |
| 6 | #include <base/vmath.h> |
| 7 | |
| 8 | #include <game/client/component.h> |
| 9 | |
| 10 | class CEffects : public CComponent |
| 11 | { |
| 12 | private: |
| 13 | bool m_Add5hz; |
| 14 | int64_t m_LastUpdate5hz = 0; |
| 15 | |
| 16 | bool m_Add50hz; |
| 17 | int64_t m_LastUpdate50hz = 0; |
| 18 | |
| 19 | bool m_Add100hz; |
| 20 | int64_t m_LastUpdate100hz = 0; |
| 21 | |
| 22 | int64_t m_SkidSoundTimer = 0; |
| 23 | |
| 24 | public: |
| 25 | CEffects(); |
| 26 | int Sizeof() const override { return sizeof(*this); } |
| 27 | |
| 28 | void OnRender() override; |
| 29 | |
| 30 | void BulletTrail(vec2 Pos, float Alpha, float TimePassed); |
| 31 | void SmokeTrail(vec2 Pos, vec2 Vel, float Alpha, float TimePassed); |
| 32 | void SkidTrail(vec2 Pos, vec2 Vel, int Direction, float Alpha, float Volume); |
| 33 | void Explosion(vec2 Pos, float Alpha); |
| 34 | void HammerHit(vec2 Pos, float Alpha, float Volume); |
| 35 | void AirJump(vec2 Pos, float Alpha, float Volume); |
| 36 | void DamageIndicator(vec2 Pos, vec2 Dir, float Alpha); |
| 37 | void PlayerSpawn(vec2 Pos, float Alpha, float Volume); |
| 38 | void PlayerDeath(vec2 Pos, int ClientId, float Alpha); |
| 39 | void PowerupShine(vec2 Pos, vec2 Size, float Alpha); |
| 40 | void FreezingFlakes(vec2 Pos, vec2 Size, float Alpha); |
| 41 | void SparkleTrail(vec2 Pos, float Alpha); |
| 42 | void Confetti(vec2 Pos, float Alpha); |
| 43 | |
| 44 | void Update(); |
| 45 | }; |
| 46 | #endif |
| 47 | |