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
10#include <vector>
11
12class CDamageInd : public CComponent
13{
14 struct CItem
15 {
16 vec2 m_Pos;
17 vec2 m_Dir;
18 float m_RemainingLife;
19 float m_StartAngle;
20 ColorRGBA m_Color;
21 };
22
23 enum
24 {
25 MAX_ITEMS = 1024,
26 };
27
28 std::vector<CItem> m_vItems;
29 float m_ExpandSize;
30 int m_DamageIndQuadContainerIndex;
31
32public:
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