PGE API 0.4
PR00F's Game Engine full documentation
Loading...
Searching...
No Matches
PooledBullet Class Reference

Pooled Bullet class to be used with PgeObjectPool. More...

Detailed Description

Pooled Bullet class to be used with PgeObjectPool.

Definition at line 273 of file WeaponManager.h.

#include <WeaponManager.h>

+ Inheritance diagram for PooledBullet:

Public Member Functions

 PooledBullet (PgeObjectPoolBase &parentPool, PR00FsUltimateRenderingEngine &gfx)
 Most of the parameters required by Bullet ctor are NOT available when we create the pool, for those we are passing some default values.
 
 ~PooledBullet ()=default
 
 PooledBullet (const PooledBullet &)=delete
 
PooledBulletoperator= (const PooledBullet &)=delete
 
 PooledBullet (PooledBullet &&)=delete
 
PooledBulletoperator= (PooledBullet &&)=delete
 
virtual void onSetUsed () override
 Gets invoked by setUsed().
 
- Public Member Functions inherited from Bullet
 Bullet (const WeaponId &wpnId, PR00FsUltimateRenderingEngine &gfx, pge_network::PgeNetworkConnectionHandle connHandle, TPureFloat wpn_px, TPureFloat wpn_py, TPureFloat wpn_pz, TPureFloat wpn_ax, TPureFloat wpn_ay, TPureFloat wpn_az, bool visible, TPureFloat sx, TPureFloat sy, TPureFloat sz, TPureFloat speed, TPureFloat gravity, TPureFloat drag, TPureBool fragile, TPureFloat fDistMax, const ParticleType &particleType, int nDamageAp, int nDamageHp, TPureFloat fDamageAreaSize, const DamageAreaEffect &eDamageAreaEffect, TPureFloat fDamageAreaPulse)
 Ctor to be used by PGE server instance.
 
 Bullet (const WeaponId &wpnId, PR00FsUltimateRenderingEngine &gfx, TPureFloat wpn_px, TPureFloat wpn_py, TPureFloat wpn_pz, TPureFloat wpn_ax, TPureFloat wpn_ay, TPureFloat wpn_az, bool visible, TPureFloat sx, TPureFloat sy, TPureFloat sz, TPureFloat speed, TPureFloat gravity, TPureFloat drag, const ParticleType &particleType, int nDamageHp, const TPureFloat &fDamageAreaSize, const DamageAreaEffect &eDamageAreaEffect, const TPureFloat &fDamageAreaPulse)
 Ctor to be used by PGE client instance.
 
virtual ~Bullet ()
 User is expected to explicitly call Bullet::destroyReferenceObject() after they freed up all Bullet instances.
 
 Bullet (const Bullet &)=delete
 
Bulletoperator= (const Bullet &)=delete
 
 Bullet (Bullet &&)=delete
 
Bulletoperator= (Bullet &&)=delete
 
CConsole & getConsole () const
 Returns access to console preset with logger module name as this class.
 
BulletId getId () const
 
const WeaponIdgetWeaponId () const
 
pge_network::PgeNetworkConnectionHandle getOwner () const
 
const PurePosUpTarget & getPut () const
 
TPureFloat getSpeed () const
 
TPureFloat getGravity () const
 
TPureFloat getDrag () const
 
TPureBool isFragile () const
 
const ParticleTypegetParticleType () const
 
int & getParticleEmitPerNthPhysicsIterationCntr ()
 
const int & getParticleEmitPerNthPhysicsIterationCntr () const
 
int & getParticlesEmittedTotal ()
 
const int & getParticlesEmittedTotal () const
 
TPureFloat getTravelDistanceMax () const
 
TPureFloat getTravelledDistance () const
 
int getDamageAp () const
 Maximum damage to Player AP this bullet can cause.
 
int getDamageHp () const
 Maximum damage to Player HP this bullet can cause.
 
TPureFloat getAreaDamageSize () const
 
const DamageAreaEffectgetAreaDamageEffect () const
 
TPureFloat getAreaDamagePulse () const
 
bool & isCreateSentToClients ()
 
void init (const WeaponId &wpnId, PR00FsUltimateRenderingEngine &gfx, pge_network::PgeNetworkConnectionHandle connHandle, TPureFloat wpn_px, TPureFloat wpn_py, TPureFloat wpn_pz, TPureFloat wpn_ax, TPureFloat wpn_ay, TPureFloat wpn_az, bool visible, TPureFloat sx, TPureFloat sy, TPureFloat sz, TPureFloat speed, TPureFloat gravity, TPureFloat drag, TPureBool fragile, TPureFloat fDistMax, const ParticleType &particleType, int nDamageAp, int nDamageHp, TPureFloat fDamageAreaSize, const DamageAreaEffect &eDamageAreaEffect, TPureFloat fDamageAreaPulse)
 Init to be used by PGE server instance.
 
void init (const BulletId &id, const WeaponId &wpnId, PR00FsUltimateRenderingEngine &gfx, TPureFloat wpn_px, TPureFloat wpn_py, TPureFloat wpn_pz, TPureFloat wpn_ax, TPureFloat wpn_ay, TPureFloat wpn_az, bool visible, TPureFloat sx, TPureFloat sy, TPureFloat sz, TPureFloat speed, TPureFloat gravity, TPureFloat drag, const ParticleType &particleType, int nDamageHp, TPureFloat fDamageAreaSize, const DamageAreaEffect &eDamageAreaEffect, TPureFloat fDamageAreaPulse)
 Init to be used by PGE client instance.
 
void Update (const unsigned int &nFactor)
 
PureObject3D & getObject3D ()
 
const PureObject3D & getObject3D () const
 
- Public Member Functions inherited from PgePooledObject
virtual ~PgePooledObject ()=default
 
 PgePooledObject (const PgePooledObject &)=default
 
PgePooledObjectoperator= (const PgePooledObject &)=default
 
 PgePooledObject (PgePooledObject &&)=default
 
PgePooledObjectoperator= (PgePooledObject &&)=default
 
PgeObjectPoolBasegetParentPool ()
 
const PgeObjectPoolBasegetParentPool () const
 
const bool & used () const
 
const PgePooledObjectnext () const
 
PgePooledObjectnext ()
 
void remove ()
 Convenience function.
 

Additional Inherited Members

- Public Types inherited from Bullet
enum  ParticleType { None , Smoke }
 
enum  DamageAreaEffect { Constant , Linear }
 
typedef uint32_t BulletId
 
- Static Public Member Functions inherited from Bullet
static const char * getLoggerModuleName ()
 Returns the logger module name of this class.
 
static BulletId getGlobalBulletId ()
 
static void resetGlobalBulletId ()
 
static void destroyReferenceObject ()
 
- Protected Member Functions inherited from PgePooledObject
 PgePooledObject (PgeObjectPoolBase &parentPool)
 

Constructor & Destructor Documentation

◆ PooledBullet() [1/3]

PooledBullet::PooledBullet ( PgeObjectPoolBase & parentPool,
PR00FsUltimateRenderingEngine & gfx )
inline

Most of the parameters required by Bullet ctor are NOT available when we create the pool, for those we are passing some default values.

Later when a pooled bullet is actually "created" by firing a weapon, those values should be properly specified.

Definition at line 279 of file WeaponManager.h.

◆ ~PooledBullet()

PooledBullet::~PooledBullet ( )
default

◆ PooledBullet() [2/3]

PooledBullet::PooledBullet ( const PooledBullet & )
delete

◆ PooledBullet() [3/3]

PooledBullet::PooledBullet ( PooledBullet && )
delete

Member Function Documentation

◆ onSetUsed()

virtual void PooledBullet::onSetUsed ( )
inlineoverridevirtual

Gets invoked by setUsed().

Derived class can override this to take action whenever the object's used state changes.

Reimplemented from PgePooledObject.

Definition at line 311 of file WeaponManager.h.

◆ operator=() [1/2]

PooledBullet & PooledBullet::operator= ( const PooledBullet & )
delete

◆ operator=() [2/2]

PooledBullet & PooledBullet::operator= ( PooledBullet && )
delete

The documentation for this class was generated from the following file: