镜像 MainMenuP0 包样例

This commit is contained in:
JSD\13999
2026-06-04 20:16:28 +08:00
parent 3b3957fb74
commit ac8fcc3c24
29 changed files with 1548 additions and 2 deletions

View File

@@ -0,0 +1,24 @@
using System;
using R3;
namespace FlowScope.Samples.MainMenuP0
{
public sealed class MainMenuViewModel
{
private readonly PlayerData _data;
public MainMenuViewModel(PlayerData data)
{
_data = data ?? throw new ArgumentNullException(nameof(data));
}
public ReactiveProperty<int> Gold => _data.Gold;
public event Action<int> GoldChanged;
public void IncrementGold()
{
Gold.Value++;
GoldChanged?.Invoke(Gold.Value);
}
}
}