The First Player
Drawing the Player
Update and Draw
#pragma once
#include <SFML/Graphics/RenderTarget.hpp>
#include <SFML/Graphics/Sprite.hpp>
#include "engine/app.h"
namespace game {
class Player {
public:
explicit Player(ng::App* app);
void Update();
void Draw(sf::RenderTarget& target);
private:
ng::App* app_ = nullptr;
sf::Sprite sprite_;
};
} // namespace gamePixels Per Unit (PPU)
Sprite Origin
Moving the Player
Following the Player
Last updated