Have a really bad walking sound.
This commit is contained in:
parent
20cbc3a21c
commit
3720340ab7
4 changed files with 6 additions and 2 deletions
|
@ -2,7 +2,8 @@
|
|||
"sounds": {
|
||||
"sword_1": "assets/sword.1.ogg",
|
||||
"monster_16": "assets/monster-16.ogg",
|
||||
"monster_1": "assets/monster-1.ogg"
|
||||
"monster_1": "assets/monster-1.ogg",
|
||||
"step_leather_1": "assets/step_leather_1.ogg"
|
||||
},
|
||||
"sprites": {
|
||||
"armored_knight": "assets/armored_knight_1-256.png",
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
},
|
||||
{"_type": "Combat", "hp": 200, "max_hp": 200, "damage": 15, "dead": false},
|
||||
{"_type": "Motion", "dx": 0, "dy": 0, "random": false},
|
||||
{"_type": "LightSource", "strength": 60, "radius": 1.8},
|
||||
{"_type": "LightSource", "strength": 50, "radius": 1.0},
|
||||
{"_type": "EnemyConfig", "hearing_distance": 5},
|
||||
{"_type": "Animation", "scale": 0.2, "simple": true, "frames": 10, "speed": 1.0}
|
||||
]
|
||||
|
|
BIN
assets/step_leather_1.ogg
Normal file
BIN
assets/step_leather_1.ogg
Normal file
Binary file not shown.
|
@ -7,6 +7,7 @@
|
|||
#include <numbers>
|
||||
#include "systems.hpp"
|
||||
#include "events.hpp"
|
||||
#include "sound.hpp"
|
||||
|
||||
namespace gui {
|
||||
using namespace components;
|
||||
|
@ -201,6 +202,8 @@ namespace gui {
|
|||
Point move_to = $main_ui.plan_move(dir, strafe);
|
||||
|
||||
if($level.map->can_move(move_to) && !$level.collision->occupied(move_to)) {
|
||||
fmt::println("PLAYING WALK");
|
||||
sound::play("step_leather_1");
|
||||
state(MOVING);
|
||||
} else {
|
||||
state(IDLE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue