Move through course, sprite and input

Signed-off-by: Daniel Henry <iamdanhenry@gmail.com>
This commit is contained in:
2025-09-05 11:00:14 -05:00
parent c545d800d2
commit b64f931010
342 changed files with 2258 additions and 33 deletions

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