Esempio n. 1
0
 public override void Initialize(GameObject go)
 {
     _self        = go;
     _triggerAura = new SphereTriggerMethod();
     _triggerAura.SetRadius(_backlashRadius).SetFollow(_self).SetLayerMask((int)LayerMaskHelper.Entity);
     _trigger        = new Trigger(_triggerAura);
     _trigger.Enter += Enter;
     _trigger.Exit  += Exit;
 }
Esempio n. 2
0
        public override void Initialize(GameObject go)
        {
            base.Initialize(go);
            _trigger       = new Trigger(_triggerMethod);
            _triggerMethod = new SphereTriggerMethod();
            _triggerMethod.SetRadius(_areaOfEffect).SetFollow(Self).SetLayerMask((int)LayerMaskHelper.Entity);
            var damage = new Damage(_damage, DamageType.Pure, Self);

            _aeraOfEffectDamageOverTimeTicker = new WildfireTickAction(_tickInfo.TicksRequired, _tickInfo.Duration, _trigger, damage);
        }
Esempio n. 3
0
            public CurseInstance(NetherCurse curse, Vector3 position) :
                base(curse.TicksRequired, curse.TickDuration)
            {
                var triggerAura = new SphereTriggerMethod();

                triggerAura.SetRadius(curse.AreaOfEffect).SetPosition(position)
                .SetLayerMask((int)LayerMaskHelper.Entity);
                _trigger = new Trigger(triggerAura);

                _trigger.Enter += OnUnitEnter;
                _trigger.Stay  += OnUnitEnter;

                _self           = curse.Self;
                _damageOverTime = curse.TotalDamage / TicksRequired;
                _teamable       = _self.GetComponent <ITeamable>();


                _debugInst = Instantiate(curse._debugPrefab);
                _debugInst.transform.position   = position;
                _debugInst.transform.localScale = Vector3.one * curse.AreaOfEffect;
            }