small name changes

This commit is contained in:
Erik Persson 2014-01-16 11:07:45 +01:00
parent ceac5ce31d
commit 567fa229eb
7 changed files with 18 additions and 18 deletions

View File

@ -39,16 +39,16 @@ AttatchmentMassDriver::~AttatchmentMassDriver(void)
/******************************************************** /********************************************************
* Uses the attatchment and will from here switch case the different WEAPON_FIRE's that are to be used * Uses the attatchment and will from here switch case the different WEAPON_FIRE's that are to be used
********************************************************/ ********************************************************/
void AttatchmentMassDriver::UseAttatchment(const GameLogic::WEAPON_FIRE &fireInput) void AttatchmentMassDriver::UseAttatchment(const GameLogic::WEAPON_FIRE &usage)
{ {
//switch case to determin what functionallity to use in the attatchment //switch case to determin what functionallity to use in the attatchment
switch (fireInput) switch (usage)
{ {
case WEAPON_FIRE::WEAPON_USE_PRIMARY_PRESS: case WEAPON_FIRE::WEAPON_USE_PRIMARY_PRESS:
ForcePush(fireInput); ForcePush(usage);
break; break;
case WEAPON_FIRE::WEAPON_USE_SECONDARY_PRESS: case WEAPON_FIRE::WEAPON_USE_SECONDARY_PRESS:
ForcePull(fireInput); ForcePull(usage);
break; break;
} }
@ -57,7 +57,7 @@ void AttatchmentMassDriver::UseAttatchment(const GameLogic::WEAPON_FIRE &fireInp
/******************************************************** /********************************************************
* Pushes objects in a cone in front of the weapon when fired * Pushes objects in a cone in front of the weapon when fired
********************************************************/ ********************************************************/
void AttatchmentMassDriver::ForcePush(const GameLogic::WEAPON_FIRE &fireInput) void AttatchmentMassDriver::ForcePush(const GameLogic::WEAPON_FIRE &usage)
{ {
//create coneRigidBody that will then collide with object and push them in the aimed direction //create coneRigidBody that will then collide with object and push them in the aimed direction
} }
@ -65,7 +65,7 @@ void AttatchmentMassDriver::ForcePush(const GameLogic::WEAPON_FIRE &fireInput)
/******************************************************** /********************************************************
* Pulls the player in the direction he is looking, used for fast movement(kinda like a jetpack) * Pulls the player in the direction he is looking, used for fast movement(kinda like a jetpack)
********************************************************/ ********************************************************/
void AttatchmentMassDriver::ForcePull(const WEAPON_FIRE &fireInput) void AttatchmentMassDriver::ForcePull(const WEAPON_FIRE &usage)
{ {
//Oyster::Physics::API::Instance().ApplyForceAt(owner->GetRigidBody(), owner->GetRigidBody()->GetCenter(), owner->GetLookDir() * 100); //Oyster::Physics::API::Instance().ApplyForceAt(owner->GetRigidBody(), owner->GetRigidBody()->GetCenter(), owner->GetLookDir() * 100);
} }

View File

@ -15,26 +15,26 @@ namespace GameLogic
~AttatchmentMassDriver(void); ~AttatchmentMassDriver(void);
void UseAttatchment(const WEAPON_FIRE &fireInput); void UseAttatchment(const WEAPON_FIRE &usage);
private: private:
/******************************************************** /********************************************************
* Pushes objects and players in a cone in front of the player * Pushes objects and players in a cone in front of the player
* @param fireInput: allows switching on different functionality in this specific function * @param fireInput: allows switching on different functionality in this specific function
********************************************************/ ********************************************************/
void ForcePush(const WEAPON_FIRE &fireInput); void ForcePush(const WEAPON_FIRE &usage);
/******************************************************** /********************************************************
* Pulls the player forward, this is a movement tool * Pulls the player forward, this is a movement tool
* @param fireInput: allows switching on different functionality in this specific function * @param fireInput: allows switching on different functionality in this specific function
********************************************************/ ********************************************************/
void ForcePull(const WEAPON_FIRE &fireInput); void ForcePull(const WEAPON_FIRE &usage);
/******************************************************** /********************************************************
* Sucks objects towards the player, the player can then pick up an object and throw it as a projectile * Sucks objects towards the player, the player can then pick up an object and throw it as a projectile
* @param fireInput: allows switching on different functionality in this specific function * @param fireInput: allows switching on different functionality in this specific function
********************************************************/ ********************************************************/
void ForceSuck(const WEAPON_FIRE &fireInput); void ForceSuck(const WEAPON_FIRE &usage);
private: private:
struct PrivateData; struct PrivateData;

View File

@ -38,7 +38,7 @@ namespace GameLogic
* @param playerID: ID of the player you want to recieve the message * @param playerID: ID of the player you want to recieve the message
* @param Usage: enum value on what kind of action is to be taken * @param Usage: enum value on what kind of action is to be taken
********************************************************/ ********************************************************/
void UseWeapon(int playerID, const WEAPON_FIRE &Usage); void UseWeapon(const WEAPON_FIRE &Usage);
/******************************************************** /********************************************************
* Gets players position * Gets players position

View File

@ -20,9 +20,9 @@ void Game::PlayerData::Move(const PLAYER_MOVEMENT &movement)
{ {
this->player->Move(movement); this->player->Move(movement);
} }
void Game::PlayerData::UseWeapon(int playerID, const WEAPON_FIRE &Usage) void Game::PlayerData::UseWeapon(const WEAPON_FIRE &usage)
{ {
this->player->UseWeapon(usage);
} }
Oyster::Math::Float3 Game::PlayerData::GetPosition() Oyster::Math::Float3 Game::PlayerData::GetPosition()
{ {

View File

@ -71,9 +71,9 @@ void Player::MoveLeft()
setState.ApplyLinearImpulse(-r * 100); setState.ApplyLinearImpulse(-r * 100);
} }
void Player::UseWeapon(const WEAPON_FIRE &Usage) void Player::UseWeapon(const WEAPON_FIRE &usage)
{ {
this->weapon->Use(Usage); this->weapon->Use(usage);
} }
void Player::Respawn(Oyster::Math::Float3 spawnPoint) void Player::Respawn(Oyster::Math::Float3 spawnPoint)

View File

@ -50,11 +50,11 @@ Weapon::~Weapon(void)
/******************************************************** /********************************************************
* Uses the weapon based on the input given and the current chosen attatchment * Uses the weapon based on the input given and the current chosen attatchment
********************************************************/ ********************************************************/
void Weapon::Use(const WEAPON_FIRE &fireInput) void Weapon::Use(const WEAPON_FIRE &usage)
{ {
if (myData->selectedAttatchment) if (myData->selectedAttatchment)
{ {
myData->selectedAttatchment->UseAttatchment(fireInput); myData->selectedAttatchment->UseAttatchment(usage);
} }
} }