Initial commit

This commit is contained in:
2022-03-28 18:44:08 -04:00
commit e43d9a90e7
267 changed files with 17049 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
namespace Services.Immortal;
public class TimingService : ITimingService {
private int _timing = 360;
public void Subscribe(Action action) {
_onChange += action;
}
public void Unsubscribe(Action action) {
_onChange -= action;
}
public int GetTiming() {
return _timing;
}
public void SetTiming(int timing) {
if (_timing != timing) {
_timing = timing;
NotifyDataChanged();
}
}
private event Action _onChange;
private void NotifyDataChanged() {
_onChange?.Invoke();
}
public Action OnChange() {
return _onChange;
}
}