name: "Main Area" display_name: "Main Area" panels { name: "HAIR" path: "Panels/Room_1/panel" clue: "hair" answer: "rabbit" symbols: "question" } panels { name: "PART" path: "Panels/Room_1/panel2" clue: "part" answer: "hole" symbols: "question" } vcs-git' href='https://git.fourisland.com/therapy' title='therapy Git repository'/>
summary refs log blame commit diff stats
path: root/src/components/player_physics.h
blob: 26f1fae89841dbf76060c7b3ceda64d3c5370f30 (plain) (tree)
























                                                                 
#ifndef PLAYER_PHYSICS_H
#define PLAYER_PHYSICS_H

#include "entity.h"
#include "physics_body.h"

class Game;

class PlayerPhysicsComponent : public PhysicsBodyComponent {
  public:
    PlayerPhysicsComponent();
    void tick(Game& game, Entity& entity, double dt);
    void receive(Game& game, Entity& entity, const Message& msg);
    
  private:
    double jump_velocity;
    double jump_gravity;
    double jump_gravity_short;
    int direction = 0;
    bool canDrop = false;
    bool frozen = false;
    bool isFalling = false;
};

#endif