mirror of
https://forge.univ-lyon1.fr/tplifap4/dungeonanddeamon.git
synced 2024-02-27 13:31:50 +01:00
Mouvement de notre joueur (tj probleme de saut)
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
#include "Player.h"
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
@ -8,19 +7,19 @@
|
||||
#include <Input.hpp>
|
||||
|
||||
namespace godot {
|
||||
class Player : public KinematicBody2D
|
||||
class GestionPlayer : public KinematicBody2D
|
||||
{
|
||||
|
||||
// Godot structure
|
||||
private:
|
||||
GODOT_CLASS(Player, KinematicBody2D)
|
||||
GODOT_CLASS(GestionPlayer, KinematicBody2D)
|
||||
public:
|
||||
static void _register_methods();
|
||||
void _init();
|
||||
void _process(float delta);
|
||||
|
||||
Player();
|
||||
~Player();
|
||||
GestionPlayer();
|
||||
~GestionPlayer();
|
||||
|
||||
|
||||
// Gameplay variables
|
||||
@ -34,12 +33,14 @@ namespace godot {
|
||||
bool left;
|
||||
bool jump;
|
||||
|
||||
|
||||
private:
|
||||
Vector2 velocity;
|
||||
Vector2 FLOOR;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Gameplay methods
|
||||
public:
|
||||
@ -54,6 +55,5 @@ namespace godot {
|
||||
}
|
||||
|
||||
|
||||
attack();
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user