KernelAPI reference
Class Achievement
Namespace: MicroEngine.Core
Assembly: MicroEngine.Achievements.dll
Guide: Game lifecycle and time
One entry of a game’s achievement catalog. Id is the stable key stored in saves, so names and descriptions can change freely. Goal of 1 is an immediate achievement; larger goals are progressive (“win 10 battles”).
public sealed record Achievement : IEquatable<Achievement>Inheritance
Implements
Constructors
Achievement(string, string, string, int)
One entry of a game’s achievement catalog. Id is the stable key stored in saves, so names and descriptions can change freely. Goal of 1 is an immediate achievement; larger goals are progressive (“win 10 battles”).
public Achievement(string Id, string Name, string Description, int Goal = 1)Parameters
Id string
Name string
Description string
Goal int
Properties
Description
public string Description { get; init; }Property Value
Goal
public int Goal { get; init; }Property Value
Icon
Optional picture for the game’s banner and list.
public Sprite? Icon { get; init; }Property Value
Id
public string Id { get; init; }Property Value
Name
public string Name { get; init; }Property Value
Methods
<Clone>$()
public Achievement <Clone>$()Returns
Deconstruct(out string, out string, out string, out int)
public void Deconstruct(out string Id, out string Name, out string Description, out int Goal)Parameters
Id string
Name string
Description string
Goal int
Equals(object?)
public override bool Equals(object? obj)Parameters
obj object?
Returns
Equals(Achievement?)
public bool Equals(Achievement? other)Parameters
other Achievement?
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(Achievement?, Achievement?)
public static bool operator ==(Achievement? left, Achievement? right)Parameters
left Achievement?
right Achievement?
Returns
operator !=(Achievement?, Achievement?)
public static bool operator !=(Achievement? left, Achievement? right)Parameters
left Achievement?
right Achievement?