Motor de sprites/animacions/surfaces i jugador centrat (v0.2.0)

This commit is contained in:
JailDesigner committed 2026-04-18 21:02:55 +02:00
1 parent 7bb1edd08a
commit de5a670fdb
34 files changed
+16137 -81

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
#include "game/entities/player.hpp"
#include "core/resources/resource_cache.hpp"
Player::Player(float x, float y)
: AnimatedSprite(Resource::Cache::get().getAnimationData("player.yaml")) {
setPos(x, y);
setCurrentAnimation("stand");
}
+10
View File
@@ -0,0 +1,10 @@
#pragma once
#include "core/rendering/sprite/animated_sprite.hpp"
class Player : public AnimatedSprite {
public:
// Construeix el jugador a partir del recurs d'animació "player.yaml"
// ja registrat al cache. Comença en l'animació "stand".
Player(float x, float y);
};