Motor de sprites/animacions/surfaces i jugador centrat (v0.2.0)
This commit is contained in:
1 parent
7bb1edd08a
commit
de5a670fdb
34 files changed
+16137
-81
No files matched your search
@@ -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");
|
||||
}
|
||||
@@ -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);
|
||||
};
|
||||
Reference in new issue
Block a user