Upload files to "/"

This commit is contained in:
Wolf 2025-09-13 20:42:57 +00:00
parent 3473670f67
commit c898dd8996
4 changed files with 147 additions and 0 deletions

31
player.hpp Normal file
View file

@ -0,0 +1,31 @@
#pragma once
#include <SFML/Graphics.hpp>
//float velocityY;
//float gravity;
//float jumpStrength;
//bool isOnGround;
class Player {
private:
sf::RectangleShape shape; // форма гравця
float speed; //швидкість гравця
float velocityY; // швидкість по вертикалі
float jumpStrength; // сила стрибка
bool onGround; //чи стоїть на землі
float gravity; // сила гравітації
float groundLevel; // висота "землі"
public:
Player(); // порожній конструктор
void update(float deltaTime);
void draw(sf::RenderWindow& window);
};