12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #pragma once
- #include <SFML/Graphics.hpp>
- #include "AnimatedSprite.hpp"
- using namespace sf;
- struct Shared;
- class Player: public AnimatedSprite {
- public:
- Player() = delete;
- Player(Shared* context);
- virtual ~Player();
- void loop(float delta);
- void move(float x, float y);
- void move(float x);
- void animate() override;
- bool dead;
- public:
- Shared* _context;
- int _jumpDirection;
- float _velocity;
- Clock iframeclock;
- bool iframed;
- };
- class Corrupted: public Sprite {
- public:
- Corrupted() = delete;
- Corrupted(Shared* context);
- virtual ~Corrupted();
- void loop(float delta);
- bool dead;
- float speed;
- int hp;
- float xd;
- int lifespan;
- float out;
- float in;
- bool ready;
- private:
- Shared* _context;
- bool _direction;
- static Texture _tex;
- Clock _anclock;
- float height;
- };
|