2012-06-14 06:06:06 -07:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2012-09-23 15:09:57 -07:00
|
|
|
#include "Entity.h"
|
2012-12-27 18:45:20 -08:00
|
|
|
#include "Item.h"
|
|
|
|
|
2012-06-14 06:06:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class cPlayer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-08-24 00:58:26 -07:00
|
|
|
// tolua_begin
|
|
|
|
class cPickup :
|
|
|
|
public cEntity
|
|
|
|
{
|
|
|
|
// tolua_end
|
|
|
|
typedef cEntity super;
|
|
|
|
|
2012-06-14 06:06:06 -07:00
|
|
|
public:
|
2012-12-21 04:21:20 -08:00
|
|
|
CLASS_PROTODEF(cPickup);
|
2012-06-14 06:06:06 -07:00
|
|
|
|
2013-01-11 20:46:01 -08:00
|
|
|
cPickup(int a_MicroPosX, int a_MicroPosY, int a_MicroPosZ, const cItem & a_Item, float a_SpeedX = 0.f, float a_SpeedY = 0.f, float a_SpeedZ = 0.f); // tolua_export
|
2012-08-24 00:58:26 -07:00
|
|
|
|
|
|
|
virtual void Initialize(cWorld * a_World) override;
|
2012-06-14 06:06:06 -07:00
|
|
|
|
2013-01-11 20:46:01 -08:00
|
|
|
cItem & GetItem(void) {return m_Item; } // tolua_export
|
2012-12-27 18:45:20 -08:00
|
|
|
const cItem & GetItem(void) const {return m_Item; }
|
2012-06-14 06:06:06 -07:00
|
|
|
|
2012-08-24 00:58:26 -07:00
|
|
|
virtual void SpawnOn(cClientHandle & a_ClientHandle) override;
|
2012-06-14 06:06:06 -07:00
|
|
|
|
2013-01-11 20:46:01 -08:00
|
|
|
virtual bool CollectedBy(cPlayer * a_Dest); // tolua_export
|
2012-06-14 06:06:06 -07:00
|
|
|
|
2012-12-22 02:15:53 -08:00
|
|
|
virtual void Tick(float a_Dt, MTRand & a_TickRandom) override;
|
|
|
|
virtual void HandlePhysics(float a_Dt) override;
|
2012-06-14 06:06:06 -07:00
|
|
|
|
2012-08-24 00:58:26 -07:00
|
|
|
const Vector3f & GetSpeed(void) const {return m_Speed; }
|
|
|
|
|
2012-06-14 06:06:06 -07: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;
|
|
|
|
|
2012-12-27 18:45:20 -08:00
|
|
|
cItem m_Item;
|
2012-06-14 06:06:06 -07:00
|
|
|
|
|
|
|
bool m_bCollected;
|
2013-01-11 20:46:01 -08:00
|
|
|
}; // tolua_export
|
2012-06-14 06:06:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|