18 lines
341 B
C#
18 lines
341 B
C#
using Chickensoft.Collections;
|
|
|
|
namespace Zennysoft.Game.Implementation.Components;
|
|
|
|
public class LuckComponent
|
|
{
|
|
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);
|
|
}
|