First commit for private source control. Older commits available on Github.

This commit is contained in:
2026-03-26 12:52:52 +00:00
parent a04c602626
commit 2d449c4a17
2176 changed files with 408185 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
using System.Collections.Generic;
using System.Linq;
using BriarQueen.Data.Identifiers;
using BriarQueen.Framework.Managers.Achievements.Data;
using UnityEngine;
namespace BriarQueen.Framework.Registries
{
[CreateAssetMenu(menuName = "Briar Queen/Registries/New Achievement Registry", fileName = "Achievement Registry")]
public class AchievementRegistry : ScriptableObject
{
[SerializeField]
private List<AchievementSo> _achievementSos;
private Dictionary<AchievementID, AchievementSo> _achievementDictionary;
private void EnsureInitialized()
{
if (_achievementDictionary != null)
return;
_achievementDictionary = _achievementSos.ToDictionary(achievement => achievement.Achievement,
achievement => achievement);
}
public bool TryGetAchievement(AchievementID identifier, out AchievementSo achievement)
{
EnsureInitialized();
return _achievementDictionary.TryGetValue(identifier, out achievement);
}
public IEnumerable<AchievementSo> GetAchievements()
{
EnsureInitialized();
return _achievementDictionary.Values;
}
}
}