Adding musics

This commit is contained in:
AnonymusRaccoon
2020-01-08 17:12:35 +01:00
parent 1771349f34
commit 86a5eb97f9
7 changed files with 18 additions and 2 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ INCLUDE = -I ./include -I lib/gamacon/include -I lib/gamacon/lib/xmlparser/inclu
CFLAGS = $(INCLUDE) -Wall -Wshadow -Wextra CFLAGS = $(INCLUDE) -Wall -Wshadow -Wextra
LDFLAGS = -L lib/gamacon -L lib/my -L lib/xmlparser -L lib/quadtree\ LDFLAGS = -L lib/gamacon -L lib/my -L lib/xmlparser -L lib/quadtree\
-lgamacon -lxmlparser -lquadtree -lmy -lcsfml-system -lcsfml-graphics -lcsfml-window -lm -lgamacon -lxmlparser -lquadtree -lmy -lcsfml-system -lcsfml-graphics -lcsfml-audio -lcsfml-window -lm
NAME = my_runner NAME = my_runner
Binary file not shown.
Binary file not shown.
+1
View File
@@ -6,6 +6,7 @@
<sprite src="assets/sprites/bck_layer4.png" /> <sprite src="assets/sprites/bck_layer4.png" />
<sprite src="assets/sprites/grass.png" /> <sprite src="assets/sprites/grass.png" />
</textures> </textures>
<music src="assets/musics/music.ogg"/>
<gc_entities> <gc_entities>
<gc_entity> <gc_entity>
<transform_component> <transform_component>
+11
View File
@@ -0,0 +1,11 @@
<gc_entities>
<gc_entity>
<transform_component>
<Position x="300" y="300">
<Size x="100" y="100">
</transform_component>
<sprite_renderer>
<Rect height="auto" width="auto" top="0" left="0" />
</sprite_renderer>
</gc_entity>
</gc_entities>
+4
View File
@@ -56,6 +56,10 @@ int start_game(const char *map)
return (ERROR); return (ERROR);
while (engine->is_open(engine)) { while (engine->is_open(engine)) {
engine->game_loop(engine, sfTime_asSeconds(sfClock_restart(clock))); engine->game_loop(engine, sfTime_asSeconds(sfClock_restart(clock)));
if (engine->is_keypressed(sfKeyEscape)) {
prefab_load(engine, "prefabs/pause.gcprefab");
sfClock_restart(clock);
}
} }
engine->destroy(engine); engine->destroy(engine);
sfClock_destroy(clock); sfClock_destroy(clock);