DDraceNetwork Docs
projectile.h
Go to the documentation of this file.
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_PREDICTION_ENTITIES_PROJECTILE_H
4#define GAME_CLIENT_PREDICTION_ENTITIES_PROJECTILE_H
5
7
9
10class CProjectile : public CEntity
11{
12 friend class CGameWorld;
13 friend class CItems;
14
15public:
17 CGameWorld *pGameWorld,
18 int Type,
19 int Owner,
20 vec2 Pos,
21 vec2 Dir,
22 int Span,
23 bool Freeze,
24 bool Explosive,
25 int SoundImpact,
26 int Layer = 0,
27 int Number = 0);
28
29 vec2 GetPos(float Time);
31
32 void Tick() override;
33
34 bool Match(CProjectile *pProj);
35 void SetBouncing(int Value);
36
37 const vec2 &GetDirection() { return m_Direction; }
38 const int &GetOwner() { return m_Owner; }
39 const int &GetStartTick() { return m_StartTick; }
40 CProjectile(CGameWorld *pGameWorld, int Id, const CProjectileData *pProj);
41
42private:
46 int m_Type;
48 float m_Force;
51
52 // DDRace
53
57};
58
59#endif
Definition: entity.h:13
const vec2 & GetPos() const
Definition: entity.h:41
Definition: gameworld.h:17
Definition: items.h:12
Definition: projectile_data.h:14
Definition: projectile.h:11
bool m_Freeze
Definition: projectile.h:55
int m_Bouncing
Definition: projectile.h:54
bool Match(CProjectile *pProj)
Definition: projectile.cpp:215
vec2 m_Direction
Definition: projectile.h:43
void Tick() override
Definition: projectile.cpp:72
int m_SoundImpact
Definition: projectile.h:47
int m_Owner
Definition: projectile.h:45
float m_Force
Definition: projectile.h:48
CProjectile(CGameWorld *pGameWorld, int Type, int Owner, vec2 Pos, vec2 Dir, int Span, bool Freeze, bool Explosive, int SoundImpact, int Layer=0, int Number=0)
Definition: projectile.cpp:13
const vec2 & GetDirection()
Definition: projectile.h:37
const int & GetStartTick()
Definition: projectile.h:39
int m_TuneZone
Definition: projectile.h:56
void SetBouncing(int Value)
Definition: projectile.cpp:153
CProjectileData GetData() const
Definition: projectile.cpp:198
bool m_Explosive
Definition: projectile.h:50
int m_StartTick
Definition: projectile.h:49
int m_LifeSpan
Definition: projectile.h:44
int m_Type
Definition: projectile.h:46
const int & GetOwner()
Definition: projectile.h:38