Session 1: Particle effects system with click, building, and achievement visual feedback

This commit is contained in:
Hermes Agent
2026-08-19 13:26:07 +00:00
parent 1df8bd9dd6
commit 42adcdaa87
7 changed files with 257 additions and 0 deletions
+8
View File
@@ -164,6 +164,14 @@ const Achievements = {
if (achievement.condition(Game.state)) {
Game.state.achievements.push(id);
UI.showNotification(`Achievement: ${achievement.name}!`, 'achievement');
// Particle effect for achievement unlock
const countEl = document.querySelector('#achievements-tab h3');
if (countEl) {
const rect = countEl.getBoundingClientRect();
Particles.createAchievementEffect(rect.left + rect.width / 2, rect.top + rect.height / 2);
}
console.log(`🏆 Achievement unlocked: ${achievement.name}`);
}
}