feat(player): added movements

This commit is contained in:
2024-01-08 14:13:16 +01:00
parent c7c7c91818
commit 0fed252afd
8 changed files with 113 additions and 4 deletions
+24
View File
@@ -0,0 +1,24 @@
#pragma once
#include <SFML/Graphics.hpp>
#include <iostream>
using namespace std;
using namespace sf;
class Player
{
public:
Player(RenderWindow& window): _window(window) {}
CircleShape PlayerShape = CircleShape(20, 3);
void DrawPlayer();
void Move(int direction);
private:
int _x = 0;
int _velocity = 7;
RenderWindow& _window;
};