Example #1
0
 public void Initialize(ICoreData data)
 {
     _icon = data.Icon;
     _healthable.Initialize(data.HealthableData);
     _armorable.Initialize(data.ArmorableData);
     _teamable.Initialize(_initialTeam);
 }
Example #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);
 }
Example #3
0
#pragma warning restore 649
        public void Initialize(IUnitData data)
        {
            _icon = data.Icon;
            _healthable.Initialize(data.HealthableData);
            _magicable.Initialize(data.MagicableData);
            _armorable.Initialize(data.ArmorableData);
            _aggroable.Initialize(data.AggroableData);
            _attackerable.Initialize(data.AttackerableData);
            _movable.Initialize(data.MovableData);
        }
Example #4
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);
            }
        }