Danbias/Code/Game/GameLogic/Weapon.h

46 lines
1.0 KiB
C
Raw Normal View History

2013-11-28 08:33:29 +01:00
//////////////////////////////////////////////////
//Created by Erik and Linda of the GameLogic team
//////////////////////////////////////////////////
#ifndef WEAPON_H
#define WEAPON_H
#include "GameLogicStates.h"
#include "IAttatchment.h"
#include "Player.h"
#include "AttatchmentSocket.h"
#include "DynamicArray.h"
namespace GameLogic
{
2013-12-05 11:50:39 +01:00
class Weapon
{
public:
2013-12-05 11:50:39 +01:00
Weapon(void);
Weapon(int nrOfAttatchmentSockets);
~Weapon(void);
void Use(const WEAPON_FIRE &usage, float dt);
void AddNewAttatchment(IAttatchment *attatchment, Player *owner);
void SwitchAttatchment(IAttatchment *attatchment, int socketID, Player *owner);
void RemoveAttatchment(int socketID);
void SelectAttatchment(int socketID);
bool IsFireing();
bool IsIdle();
bool IsReloading();
bool IsValidSocket(int socketID);
int GetCurrentSocketID();
private:
WEAPON_STATE weaponState;
Utility::DynamicMemory::DynamicArray<AttatchmentSocket*> attatchmentSockets;
int currentNrOfAttatchments;
IAttatchment *selectedAttatchment;
int selectedSocketID;
};
}
#endif