Files
Space-Invader/Player.h
T
alexis 9b0a7a78bb feat(laser): created laser object
Created laser object without any collision detection
2024-01-09 12:26:42 +01:00

25 lines
346 B
C++

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