Session 1: Particle effects system with click, building, and achievement visual feedback
This commit is contained in:
@@ -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}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user