public void Initialize(ICoreData data) { _icon = data.Icon; _healthable.Initialize(data.HealthableData); _armorable.Initialize(data.ArmorableData); _teamable.Initialize(_initialTeam); }
public void Initialize(IBuildingData data) { _icon = data.Icon; _healthable.Initialize(data.HealthableData); _armorable.Initialize(data.ArmorableData); _attackerable.Initialize(data.AttackerableData); _teamable.Initialize(_initialTeam); }
public void Initialize(IHeroData data) { _icon = data.Icon; _healthable.Initialize(data.HealthableData); _magicable.Initialize(data.MagicableData); _armorable.Initialize(data.ArmorableData); _attackerable.Initialize(data.AttackerableData); _movable.Initialize(data.MovableData); _teamable.Initialize(_initialTeam); var instanceAbilities = new AbilityObject[data.Abilities.Count]; for (var i = 0; i < data.Abilities.Count; i++) { instanceAbilities[i] = Instantiate(data.Abilities[i]); } _abilitiable.Initialize(instanceAbilities); var modifiableListeners = GetModules <IListener <IModifiable> >(); foreach (var listener in modifiableListeners) { listener.Register(_modifiable); } }