Started working on a SteamWorks integration

This commit is contained in:
2026-04-13 23:30:43 +01:00
parent 3e348a68b9
commit f0ea613a26
16 changed files with 787 additions and 92 deletions
@@ -0,0 +1,27 @@
using System;
namespace OmegaLeo.HelperLib.Steamworks
{
public class AchievementManager
{
public void UnlockAchievement(string achievementId)
{
if (SteamManager.Instance.IsSteamworksInitialized)
{
SteamNativeApi.SetAchievement(achievementId);
SteamNativeApi.StoreStats(); // Don't forget to store the stats
Console.WriteLine($"Attempting to unlock achievement: {achievementId}");
}
}
public bool IsAchievementUnlocked(string achievementId, out bool unlocked)
{
unlocked = false;
if (SteamManager.Instance.IsSteamworksInitialized)
{
return SteamNativeApi.GetAchievement(achievementId, out unlocked);
}
return false;
}
}
}