Danbias/Code/Game/GameLogic/Weapon.h

46 lines
1.0 KiB
C++

//////////////////////////////////////////////////
//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
{
class Weapon
{
public:
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