Removed player movement via right mouse button.

This commit is contained in:
Felix Ableitner 2013-09-18 15:14:25 +02:00
parent df94bad5e8
commit e0ef9008c6
5 changed files with 9 additions and 19 deletions

View file

@ -2,15 +2,14 @@
2d top down shooter with tactical gameplay set in a procedurally generated world.
## Controls
WASD: move
Mouse: look
Lmb: shoot
Rmb: walk to position
WASD: walk
Mouse: aim
Left Mouse Button: shoot
R: reload
Q: use left Gadget
E: use right Gadget
F: pick up item or swap Gadgets
Esc: exit
Q: use left gadget
E: use right gadget
F: pick up item or swap gadgets
Esc: exit game
## Dependencies
- SFML

View file

@ -322,10 +322,6 @@ Game::mouseDown(const sf::Event& event) {
case sf::Mouse::Left:
mPlayer->pullTrigger();
break;
case sf::Mouse::Right:
mPlayer->setDestination(convertCoordinates(event.mouseButton.x,
event.mouseButton.y));
break;
default:
break;
}

View file

@ -12,6 +12,8 @@
#include "util/Vector.h"
// TODO: remove right click move (also in readme)
/**
* Creates Game object.
*/

View file

@ -63,12 +63,6 @@ Player::setDirection(Direction direction, bool unset) {
setSpeed(dirVec, getMovementSpeed());
}
void
Player::setDestination(const Vector2f& destination) {
mDirection = 0;
Character::setDestination(destination);
}
/**
* Check if we arrived at destination, turn towards cursor.
*/

View file

@ -37,7 +37,6 @@ public:
using Character::pullTrigger;
using Character::releaseTrigger;
void setDirection(Direction direction, bool unset);
void setDestination(const Vector2f& destination);
using Character::getWeaponName;
using Character::reload;
using Character::toggleWeapon;