Now fixtures and actors are loaded the same.
This commit is contained in:
parent
4f39f2a504
commit
23f54bd4fe
3 changed files with 73 additions and 56 deletions
10
scene.hpp
10
scene.hpp
|
|
@ -11,13 +11,14 @@ namespace scene {
|
|||
using namespace textures;
|
||||
|
||||
struct Element {
|
||||
std::string name;
|
||||
textures::SpriteTexture st;
|
||||
components::Animation anim;
|
||||
std::string cell;
|
||||
float scale_x;
|
||||
float scale_y;
|
||||
float x;
|
||||
float y;
|
||||
float scale_x = 1.0f;
|
||||
float scale_y = 1.0f;
|
||||
float x = 0;
|
||||
float y = 0;
|
||||
bool at_mid=false;
|
||||
sf::Vector2f pos{0,0};
|
||||
};
|
||||
|
|
@ -35,6 +36,7 @@ namespace scene {
|
|||
void init();
|
||||
void render(sf::RenderWindow& window);
|
||||
bool mouse(float x, float y, guecs::Modifiers mods);
|
||||
|
||||
sf::Vector2f position_sprite(textures::SpriteTexture& st, const std::string& cell_name, float scale_x, float scale_y, bool at_mid, float x_diff=0.0f, float y_diff=0.0f);
|
||||
|
||||
void move_actor(const std::string& actor, const std::string& cell_name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue