public void InitData(IMemberBattleData data, ChangeStorage storage) { _storage = storage; StaticId = data.StaticId; Position = data.Position; CurrentHp = data.CurrentHp; Status = data.Status; LL_TurnInfluence.Init(data.TurnInfluence, storage); LL_TurnBuffTypes.Init(data.TurnBuffTypes, storage); LL_TurnBuffs.Init(data.TurnBuffs, storage); TurnFamiliarSummoned = data.TurnFamiliarSummoned; LD_Buffs.Init(data.Buffs, storage); LD_Abilities.Init(data.Abilities, storage); HpMax = data.HpMax; Strength = data.Strength; Initiative = data.Initiative; MemberType = data.MemberType; FamiliarSummoned = data.FamiliarSummoned; Assist = data.Assist; }
public void InitData(IMemberBattleDataClient client, ChangeStorage storage) { _storage = storage; StaticId = client.StaticId; Position = client.Position; client.CurrentHp.Subscribe(x => _CurrentHp = x).AddTo(_disposables); client.Status.Subscribe(x => _Status = x).AddTo(_disposables); LL_TurnInfluence.Init(client.TurnInfluence, storage); LL_TurnBuffTypes.Init(client.TurnBuffTypes, storage); LL_TurnBuffs.Init(client.TurnBuffs, storage); client.TurnFamiliarSummoned.Subscribe(x => _TurnFamiliarSummoned = x).AddTo(_disposables); LD_Buffs.Init(client.Buffs, storage); LD_Abilities.Init(client.Abilities, storage); client.HpMax.Subscribe(x => _HpMax = x).AddTo(_disposables); client.Strength.Subscribe(x => _Strength = x).AddTo(_disposables); client.Initiative.Subscribe(x => _Initiative = x).AddTo(_disposables); client.MemberType.Subscribe(x => _MemberType = x).AddTo(_disposables); client.FamiliarSummoned.Subscribe(x => _FamiliarSummoned = x).AddTo(_disposables); client.Assist.Subscribe(x => _Assist = x).AddTo(_disposables); }
public void InitData(string root, ChangeStorage storage) { _storage = storage; DataId = $"{root}.{DataId}"; Interface_StaticId = _StaticId; Interface_Position = _Position; Interface_CurrentHp = new ReactiveProperty <Single>(_CurrentHp); Interface_Status = new ReactiveProperty <UnitBattleStatus>(_Status); LL_TurnInfluence?.Init($"{DataId}.turn_influence", storage, _TurnInfluence); LL_TurnBuffTypes?.Init($"{DataId}.turn_buff_types", storage, _TurnBuffTypes); LL_TurnBuffs?.Init($"{DataId}.turn_buffs", storage, _TurnBuffs); Interface_TurnFamiliarSummoned = new ReactiveProperty <Boolean>(_TurnFamiliarSummoned); LD_Buffs?.Init($"{DataId}.buffs", storage, _Buffs); LD_Abilities?.Init($"{DataId}.abilities", storage, _Abilities); Interface_HpMax = new ReactiveProperty <BattleParamData>(_HpMax); Interface_Strength = new ReactiveProperty <BattleParamData>(_Strength); Interface_Initiative = new ReactiveProperty <BattleParamData>(_Initiative); Interface_MemberType = new ReactiveProperty <BattleMemberType>(_MemberType); Interface_FamiliarSummoned = new ReactiveProperty <Boolean>(_FamiliarSummoned); Interface_Assist = new ReactiveProperty <Boolean>(_Assist); }