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_DAMAGEIND_H
4#define GAME_CLIENT_COMPONENTS_DAMAGEIND_H
5#include <base/color.h>
6#include <base/vmath.h>
7
8#include <game/client/component.h>
9
10class CDamageInd : public CComponent
11{
12 struct CItem
13 {
14 vec2 m_Pos;
15 vec2 m_Dir;
16 float m_RemainingLife;
17 float m_StartAngle;
18 ColorRGBA m_Color;
19 };
20
21 enum
22 {
23 MAX_ITEMS = 64,
24 };
25
26 CItem m_aItems[MAX_ITEMS];
27 int m_NumItems;
28
29 int m_DmgIndQuadContainerIndex;
30
31public:
32 CDamageInd();
33 int Sizeof() const override { return sizeof(*this); }
34
35 void Create(vec2 Pos, vec2 Dir, float Alpha);
36 void OnReset() override;
37 void OnRender() override;
38 void OnInit() override;
39};
40#endif
41