Refactor stats
This commit is contained in:
18
Zennysoft.Game.Ma/src/Components/LuckComponent.cs
Normal file
18
Zennysoft.Game.Ma/src/Components/LuckComponent.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Chickensoft.Collections;
|
||||
using Zennysoft.Ma.Adapter;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
public class LuckComponent : ILuckComponent
|
||||
{
|
||||
public IAutoProp<int> Luck => _luck;
|
||||
|
||||
private AutoProp<int> _luck;
|
||||
|
||||
public LuckComponent(int initialLuck)
|
||||
{
|
||||
_luck = new AutoProp<int>(initialLuck);
|
||||
}
|
||||
|
||||
public void SetLuck(int value) => _luck.OnNext(value);
|
||||
}
|
||||
Reference in New Issue
Block a user