2010-11-20 10:37:14 +00:00
|
|
|
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
|
|
|
|
/* If you are missing that file, acquire a complete release at teeworlds.com. */
|
2010-05-29 07:25:38 +00:00
|
|
|
#ifndef GAME_CLIENT_COMPONENTS_DAMAGEIND_H
|
|
|
|
#define GAME_CLIENT_COMPONENTS_DAMAGEIND_H
|
|
|
|
#include <base/vmath.h>
|
|
|
|
#include <game/client/component.h>
|
|
|
|
|
|
|
|
class CDamageInd : public CComponent
|
|
|
|
{
|
2021-06-23 05:05:49 +00:00
|
|
|
int64_t m_Lastupdate;
|
2010-05-29 07:25:38 +00:00
|
|
|
struct CItem
|
|
|
|
{
|
|
|
|
vec2 m_Pos;
|
|
|
|
vec2 m_Dir;
|
2011-12-31 09:15:54 +00:00
|
|
|
float m_StartTime;
|
2010-05-29 07:25:38 +00:00
|
|
|
float m_StartAngle;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
2020-09-26 19:41:58 +00:00
|
|
|
MAX_ITEMS = 64,
|
2010-05-29 07:25:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
CItem m_aItems[MAX_ITEMS];
|
|
|
|
int m_NumItems;
|
|
|
|
|
|
|
|
CItem *CreateI();
|
2022-06-30 22:36:32 +00:00
|
|
|
void DestroyI(CItem *pItem);
|
2010-05-29 07:25:38 +00:00
|
|
|
|
2018-03-13 20:52:44 +00:00
|
|
|
int m_DmgIndQuadContainerIndex;
|
2020-09-26 19:41:58 +00:00
|
|
|
|
2011-04-13 18:37:12 +00:00
|
|
|
public:
|
2010-05-29 07:25:38 +00:00
|
|
|
CDamageInd();
|
2022-01-31 02:11:47 +00:00
|
|
|
virtual int Sizeof() const override { return sizeof(*this); }
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
void Create(vec2 Pos, vec2 Dir);
|
2014-09-03 12:17:44 +00:00
|
|
|
void Reset();
|
2022-01-30 23:43:56 +00:00
|
|
|
virtual void OnRender() override;
|
|
|
|
virtual void OnInit() override;
|
2010-05-29 07:25:38 +00:00
|
|
|
};
|
|
|
|
#endif
|