2013-12-13 11:06:03 +01:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
//Created by Erik of the GameLogic team
|
|
|
|
//////////////////////////////////////////////////
|
2013-12-10 09:57:05 +01:00
|
|
|
#ifndef ATTATCHMENTMASSDRIVER_H
|
|
|
|
#define ATTATCHMENTMASSDRIVER_H
|
|
|
|
#include "IAttatchment.h"
|
2014-02-25 13:56:35 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-10 09:57:05 +01:00
|
|
|
namespace GameLogic
|
|
|
|
{
|
2014-02-25 13:56:35 +01:00
|
|
|
const Oyster::Math::Float StandardMaxEnergy = 100.0f;
|
|
|
|
const Oyster::Math::Float StandardrechargeRate = 0.5f;
|
2014-02-27 12:09:51 +01:00
|
|
|
const Oyster::Math::Float Standardforce = 2000.0f;
|
2013-12-10 09:57:05 +01:00
|
|
|
|
|
|
|
class AttatchmentMassDriver : public IAttatchment
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
AttatchmentMassDriver(void);
|
2013-12-12 12:16:13 +01:00
|
|
|
AttatchmentMassDriver(Player &owner);
|
2013-12-10 09:57:05 +01:00
|
|
|
~AttatchmentMassDriver(void);
|
|
|
|
|
|
|
|
|
2014-01-21 15:46:54 +01:00
|
|
|
void UseAttatchment(const WEAPON_FIRE &usage, float dt);
|
2014-02-03 15:32:46 +01:00
|
|
|
void Update(float dt);
|
2013-12-10 09:57:05 +01:00
|
|
|
|
|
|
|
private:
|
2013-12-18 08:30:58 +01:00
|
|
|
/********************************************************
|
|
|
|
* Pushes objects and players in a cone in front of the player
|
2014-02-03 15:32:46 +01:00
|
|
|
* @param usage: allows switching on different functionality in this specific function
|
2013-12-18 08:30:58 +01:00
|
|
|
********************************************************/
|
2014-01-21 15:46:54 +01:00
|
|
|
void ForcePush(const WEAPON_FIRE &usage, float dt);
|
2013-12-18 08:30:58 +01:00
|
|
|
|
|
|
|
/********************************************************
|
|
|
|
* Pulls the player forward, this is a movement tool
|
2014-02-03 15:32:46 +01:00
|
|
|
* @param usage: allows switching on different functionality in this specific function
|
|
|
|
********************************************************/
|
|
|
|
void ForceZip(const WEAPON_FIRE &usage, float dt);
|
|
|
|
|
|
|
|
/********************************************************
|
|
|
|
* Sucks objects towards the player, the player can then pick up an object and throw it as a projectile
|
|
|
|
* @param usage: allows switching on different functionality in this specific function
|
2013-12-18 08:30:58 +01:00
|
|
|
********************************************************/
|
2014-01-21 15:46:54 +01:00
|
|
|
void ForcePull(const WEAPON_FIRE &usage, float dt);
|
2013-12-10 09:57:05 +01:00
|
|
|
|
2013-12-18 08:30:58 +01:00
|
|
|
/********************************************************
|
|
|
|
* Sucks objects towards the player, the player can then pick up an object and throw it as a projectile
|
2014-02-03 15:32:46 +01:00
|
|
|
* @param usage: allows switching on different functionality in this specific function
|
2013-12-18 08:30:58 +01:00
|
|
|
********************************************************/
|
2014-02-03 15:32:46 +01:00
|
|
|
void PickUpObject(const WEAPON_FIRE &usage, float dt);
|
|
|
|
|
2013-12-18 08:30:58 +01:00
|
|
|
|
2014-01-28 15:44:32 +01:00
|
|
|
static void ForcePushAction(Oyster::Physics::ICustomBody *obj, void* args);
|
2014-02-03 15:32:46 +01:00
|
|
|
static void AttemptPickUp(Oyster::Physics::ICustomBody *obj, void* args);
|
|
|
|
|
|
|
|
|
2014-01-22 13:02:13 +01:00
|
|
|
|
2013-12-10 09:57:05 +01:00
|
|
|
private:
|
2014-02-03 15:32:46 +01:00
|
|
|
Oyster::Physics::ICustomBody *heldObject;
|
|
|
|
bool hasObject;
|
2014-01-21 15:46:54 +01:00
|
|
|
|
2014-02-25 13:56:35 +01:00
|
|
|
Oyster::Math::Float force;
|
|
|
|
|
|
|
|
Oyster::Math::Float maxEnergy;
|
|
|
|
Oyster::Math::Float currentEnergy;
|
|
|
|
|
|
|
|
Oyster::Math::Float rechargeRate;
|
|
|
|
|
|
|
|
struct Aim
|
|
|
|
{
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2013-12-10 09:57:05 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|