Browse Source

Removed player movement via right mouse button.

master
Felix Ableitner 8 years ago
parent
commit
e0ef9008c6
  1. 15
      README.txt
  2. 4
      src/Game.cpp
  3. 2
      src/main.cpp
  4. 6
      src/sprites/Player.cpp
  5. 1
      src/sprites/Player.h

15
README.txt

@ -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

4
src/Game.cpp

@ -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;
}

2
src/main.cpp

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

6
src/sprites/Player.cpp

@ -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.
*/

1
src/sprites/Player.h

@ -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;