public void ReplaceBattleUnit(BigBattle.BattleUnitData newValue) { var index = ServerComponentsLookup.BattleUnit; var component = (BigBattle.BattleUnitComponent)CreateComponent(index, typeof(BigBattle.BattleUnitComponent)); component.value = newValue; ReplaceComponent(index, component); }
public void AddBattleUnit(BigBattle.BattleUnitData newValue) { var index = ClientComponentsLookup.BattleUnit; var component = (BigBattle.BattleUnitComponent)CreateComponent(index, typeof(BigBattle.BattleUnitComponent)); component.value = newValue; AddComponent(index, component); }