Пример #1
0
#pragma warning restore 0649

        public override void Initialize(Actor data)
        {
            base.Initialize(data);
            _activeTimer = new DurationTimer(_duration);
            _armorable   = Self.GetModule <IArmorable>();
            Checker      = new AbilityPredicateBuilder(data)
            {
                Cooldown  = new Cooldown(_cooldown),
                MagicCost = new MagicCost(Modules.Magicable, _manaCost)
            };
            View = new SimpleAbilityView()
            {
                Icon       = _icon,
                Cooldown   = Checker.Cooldown,
                StatCost   = Checker.MagicCost,
                Toggleable = new ToggleableAbilityView()
                {
                    ShowActive = true
                }
            };

            Register(data);
        }
Пример #2
0
 public Damageable(Actor actor, IHealthable healthable, IKillable killable, IArmorable armorable = default) : base(actor, killable)
 {
     _healthable = healthable;
     _armorable  = armorable;
 }