public void InitData(IBattleStateData data, ChangeStorage storage) { _storage = storage; Formation = data.Formation; Description = data.Description; LD_Enemies.Init(data.Enemies, storage); LD_Allies.Init(data.Allies, storage); LD_ReserveAllies.Init(data.ReserveAllies, storage); LD_StackMobs.Init(data.StackMobs, storage); Status = data.Status; CurrentWave = data.CurrentWave; CurrentId = data.CurrentId; }
public void InitData(IBattleStateDataClient client, ChangeStorage storage) { _storage = storage; Formation = client.Formation; Description = client.Description; LD_Enemies.Init(client.Enemies, storage); LD_Allies.Init(client.Allies, storage); LD_ReserveAllies.Init(client.ReserveAllies, storage); LD_StackMobs.Init(client.StackMobs, storage); client.Status.Subscribe(x => _Status = x).AddTo(_disposables); client.CurrentWave.Subscribe(x => _CurrentWave = x).AddTo(_disposables); client.CurrentId.Subscribe(x => _CurrentId = x).AddTo(_disposables); }
public void InitData(string root, ChangeStorage storage) { _storage = storage; DataId = $"{root}.{DataId}"; Interface_Formation = _Formation; Interface_Description = _Description; LD_Enemies?.Init($"{DataId}.current_mobs", storage, _Enemies); LD_Allies?.Init($"{DataId}.current_units", storage, _Allies); LD_ReserveAllies?.Init($"{DataId}.researve_units", storage, _ReserveAllies); LD_StackMobs?.Init($"{DataId}.stack_mobs", storage, _StackMobs); Interface_Status = new ReactiveProperty <BattleStatus>(_Status); Interface_CurrentWave = new ReactiveProperty <Int32>(_CurrentWave); Interface_CurrentId = new ReactiveProperty <Int32>(_CurrentId); }
public IReadOnlyReactiveProperty <IMemberBattleDataClient> GetReserveAlliesProperty(Int32 key) { return(LD_ReserveAllies.GetProperty(key)); }