diff --git a/examples/the-dungeon-puzzlers-lament/src/game/simulation/entity.rs b/examples/the-dungeon-puzzlers-lament/src/game/simulation/entity.rs index a4ec2bf9..e7be632e 100644 --- a/examples/the-dungeon-puzzlers-lament/src/game/simulation/entity.rs +++ b/examples/the-dungeon-puzzlers-lament/src/game/simulation/entity.rs @@ -185,10 +185,19 @@ impl EntityMap { }; if can_move { + if let Some(e) = self.map.get_mut(entity_to_update_key) { + e.location = desired_location; + } let Some(entity_to_update) = self.map.get(entity_to_update_key) else { continue; }; + animations.push(AnimationInstruction::Move( + entity_to_update_key, + desired_location, + entity_to_update.move_effect(), + )); + let overlap_resolutions: Vec<_> = self .whats_at(desired_location) .filter(|(k, _)| *k != entity_to_update_key) @@ -569,6 +578,10 @@ impl Entity { } } + fn move_effect(&self) -> Option { + None + } + fn kill_sound_effect(&self) -> Option { match self.holding() { Some(EntityType::Item(Item::Sword)) => Some(SoundEffect::SwordKill),