18 lines
285 B
C#
18 lines
285 B
C#
namespace DoomDeathmatch.Component.MVC.Model;
|
|
|
|
public class ScoreModel
|
|
{
|
|
public event Action<ScoreModel>? ScoreChanged;
|
|
|
|
public int Score
|
|
{
|
|
get => _score;
|
|
set
|
|
{
|
|
_score = Math.Max(value, 0);
|
|
ScoreChanged?.Invoke(this);
|
|
}
|
|
}
|
|
|
|
private int _score;
|
|
} |