public void InitData(IExplorerStateClient client, ExplorerAccessor accessor, ChangeStorage storage) { _storage = storage; _accessor = accessor; client.StageId.Subscribe(x => _StageId = x).AddTo(_disposables); client.RoomId.Subscribe(x => _RoomId = x).AddTo(_disposables); LD_Stages.Init(client.Stages, storage); LD_Inventory.Init(client.Inventory, storage); client.Position.Subscribe(x => _Position = x).AddTo(_disposables); client.LastInteractiveId.Subscribe(x => _LastInteractiveId = x).AddTo(_disposables); LD_PlayerBuffs.Init(client.PlayerBuffs, storage); client.IsRun.Subscribe(x => _IsRun = x).AddTo(_disposables); client.RefreshNumber.Subscribe(x => _RefreshNumber = x).AddTo(_disposables); }
public void InitData(string root, ChangeStorage storage, ExplorerAccessor accessor) { _accessor = accessor; _storage = storage; DataId = root; Interface_StageId = new ReactiveProperty <Int32>(_StageId); Interface_RoomId = new ReactiveProperty <Int32>(_RoomId); LD_Stages?.Init($"{DataId}.stages", storage, _Stages); LD_Inventory?.Init($"{DataId}.inventory", storage, _Inventory); Interface_Position = new ReactiveProperty <ExplorerPositionData>(_Position); Interface_LastInteractiveId = new ReactiveProperty <Int32>(_LastInteractiveId); LD_PlayerBuffs?.Init($"{DataId}.player_buffs", storage, _PlayerBuffs); Interface_IsRun = new ReactiveProperty <Boolean>(_IsRun); Interface_RefreshNumber = new ReactiveProperty <Int32>(_RefreshNumber); }