Exemplo n.º 1
0
 public void Initialize(ICoreData data)
 {
     _icon = data.Icon;
     _healthable.Initialize(data.HealthableData);
     _armorable.Initialize(data.ArmorableData);
     _teamable.Initialize(_initialTeam);
 }
Exemplo n.º 2
0
 public void Initialize(IBuildingData data)
 {
     _icon = data.Icon;
     _healthable.Initialize(data.HealthableData);
     _armorable.Initialize(data.ArmorableData);
     _attackerable.Initialize(data.AttackerableData);
     _teamable.Initialize(_initialTeam);
 }
Exemplo n.º 3
0
        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);
            }
        }