OnAchievementStateChanged nicer

This commit is contained in:
Garry Newman 2017-07-31 10:31:04 +01:00
parent 84954436f7
commit 7bd8aaa793

View File

@ -55,12 +55,17 @@ public void Refresh()
foreach ( var i in unlockedRecently ) foreach ( var i in unlockedRecently )
{ {
OnAchievementStateChanged?.Invoke( i ); OnUnlocked( i );
} }
unlockedRecently.Clear(); unlockedRecently.Clear();
} }
internal void OnUnlocked( Achievement a )
{
OnAchievementStateChanged?.Invoke( a );
}
public void Dispose() public void Dispose()
{ {
client = null; client = null;
@ -211,6 +216,8 @@ public bool Trigger( bool apply = true )
client.Stats.StoreStats(); client.Stats.StoreStats();
} }
client.Achievements.OnUnlocked( this );
return r; return r;
} }