Skip to content

KernelAPI reference

Struct AchievementStatus

Namespace: MicroEngine.Core
Assembly: MicroEngine.Achievements.dll
Guide: Game lifecycle and time

A snapshot of one achievement: its definition, accumulated progress and whether it is unlocked.

C#
public readonly struct AchievementStatus : IEquatable<AchievementStatus>

Implements

IEquatable<AchievementStatus>

Constructors

AchievementStatus(Achievement, int, bool)

A snapshot of one achievement: its definition, accumulated progress and whether it is unlocked.

C#
public AchievementStatus(Achievement Definition, int Progress, bool Unlocked)

Parameters

Definition Achievement

Progress int

Unlocked bool

Properties

Definition

C#
public Achievement Definition { get; init; }

Property Value

Achievement

Fraction

0..1 for drawing progress bars.

C#
public float Fraction { get; }

Property Value

float

Goal

The progress needed to unlock it.

C#
public int Goal { get; }

Property Value

int

Id

The achievement’s id.

C#
public string Id { get; }

Property Value

string

IsProgressive

Whether the goal is larger than 1, so the achievement shows progress.

C#
public bool IsProgressive { get; }

Property Value

bool

Progress

C#
public int Progress { get; init; }

Property Value

int

Unlocked

C#
public bool Unlocked { get; init; }

Property Value

bool

Methods

Deconstruct(out Achievement, out int, out bool)

C#
public void Deconstruct(out Achievement Definition, out int Progress, out bool Unlocked)

Parameters

Definition Achievement

Progress int

Unlocked bool

Equals(object)

C#
public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(AchievementStatus)

C#
public bool Equals(AchievementStatus other)

Parameters

other AchievementStatus

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(AchievementStatus, AchievementStatus)

C#
public static bool operator ==(AchievementStatus left, AchievementStatus right)

Parameters

left AchievementStatus

right AchievementStatus

Returns

bool

operator !=(AchievementStatus, AchievementStatus)

C#
public static bool operator !=(AchievementStatus left, AchievementStatus right)

Parameters

left AchievementStatus

right AchievementStatus

Returns

bool