Various cleanup

This commit is contained in:
2026-02-15 20:35:05 -08:00
parent 1a1e050dcc
commit 5233da4225
482 changed files with 1980 additions and 4908 deletions

View File

@@ -1,4 +1,5 @@
using Chickensoft.Collections;
using System;
using Zennysoft.Ma.Adapter;
namespace Zennysoft.Game.Ma;
@@ -7,7 +8,7 @@ public class LuckComponent : ILuckComponent
{
public IAutoProp<int> Luck => _luck;
private AutoProp<int> _luck;
private readonly AutoProp<int> _luck;
private readonly int _initialValue;
public LuckComponent(int initialLuck)
@@ -22,4 +23,6 @@ public class LuckComponent : ILuckComponent
}
public void IncreaseLuck(int value) => _luck.OnNext(_luck.Value + value);
public void DecreaseLuck(int value) => _luck.OnNext(Godot.Mathf.Max(_luck.Value - value, 0));
}