Move through course, sprite and input
Signed-off-by: Daniel Henry <iamdanhenry@gmail.com>
This commit is contained in:
21
LightYearsGame/include/player/PlayerSpaceship.h
Normal file
21
LightYearsGame/include/player/PlayerSpaceship.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
#include "spaceship/Spaceship.h"
|
||||
|
||||
|
||||
namespace ly {
|
||||
class PlayerSpaceship : public Spaceship {
|
||||
public:
|
||||
PlayerSpaceship(World *owningWorld, const std::string &texture = "SpaceShooterRedux/PNG/playerShip1_blue.png");
|
||||
|
||||
virtual void Tick(float deltaTime) override;
|
||||
|
||||
private:
|
||||
void HandleInput();
|
||||
void ConsumeInput(float deltaTime);
|
||||
void SetSpeed(float newSpeed) { mSpeed = newSpeed; }
|
||||
float GetSpeed() { return mSpeed; }
|
||||
void NormalizeInput();
|
||||
sf::Vector2f mMoveInput;
|
||||
float mSpeed;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user