2012-06-14 09:06:06 -04:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2012-09-23 18:09:57 -04:00
|
|
|
#include "Entity.h"
|
2012-06-14 09:06:06 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class cPlayer;
|
|
|
|
class cItem;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-08-24 03:58:26 -04:00
|
|
|
// tolua_begin
|
|
|
|
class cPickup :
|
|
|
|
public cEntity
|
|
|
|
{
|
|
|
|
// tolua_end
|
|
|
|
typedef cEntity super;
|
|
|
|
// tolua_begin
|
|
|
|
|
2012-06-14 09:06:06 -04:00
|
|
|
public:
|
2012-08-24 03:58:26 -04:00
|
|
|
// tolua_end
|
2012-06-14 09:06:06 -04:00
|
|
|
CLASS_PROTOTYPE();
|
|
|
|
|
|
|
|
cPickup(int a_X, int a_Y, int a_Z, const cItem & a_Item, float a_SpeedX = 0.f, float a_SpeedY = 0.f, float a_SpeedZ = 0.f); //tolua_export
|
|
|
|
~cPickup(); //tolua_export
|
2012-08-24 03:58:26 -04:00
|
|
|
|
|
|
|
virtual void Initialize(cWorld * a_World) override;
|
2012-06-14 09:06:06 -04:00
|
|
|
|
2012-08-24 03:58:26 -04:00
|
|
|
cItem * GetItem(void) {return m_Item; } //tolua_export
|
|
|
|
const cItem * GetItem(void) const {return m_Item; }
|
2012-06-14 09:06:06 -04:00
|
|
|
|
2012-08-24 03:58:26 -04:00
|
|
|
virtual void SpawnOn(cClientHandle & a_ClientHandle) override;
|
2012-06-14 09:06:06 -04:00
|
|
|
|
|
|
|
virtual bool CollectedBy( cPlayer* a_Dest ); //tolua_export
|
|
|
|
|
|
|
|
void Tick(float a_Dt);
|
|
|
|
void HandlePhysics(float a_Dt);
|
|
|
|
|
2012-08-24 03:58:26 -04:00
|
|
|
const Vector3f & GetSpeed(void) const {return m_Speed; }
|
|
|
|
|
2012-06-14 09:06:06 -04:00
|
|
|
private:
|
|
|
|
|
|
|
|
Vector3f m_Speed;
|
|
|
|
Vector3f m_ResultingSpeed; //Can be used to modify the resulting speed for the current tick ;)
|
|
|
|
|
|
|
|
Vector3f m_WaterSpeed;
|
|
|
|
bool m_bOnGround;
|
|
|
|
bool m_bReplicated;
|
|
|
|
|
|
|
|
float m_Timer;
|
|
|
|
|
|
|
|
cItem* m_Item;
|
|
|
|
|
|
|
|
bool m_bCollected;
|
|
|
|
}; //tolua_export
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|