Ejemplo n.º 1
0
    // Update is called once per frame
    protected virtual void Update()
    {
        if (_movingToTarget)
        {
            _projectileInstance.transform.Translate(
                new Vector3(
                    0,
                    0,
                    _moveSpeed * Time.deltaTime
                    )
                );

            if (Vector3.Distance(_projectileInstance.transform.position, _target.position) < 5f && !_halfway)
            {
                _halfway = true;

                _halfwayToTarget.Invoke();

                OnBeforeEffectHit.Invoke();
            }

            if (Vector3.Distance(_projectileInstance.transform.position, _target.position) < 2f && !_hitTarget)
            {
                _hitTarget = true;

                _reachedTarget.Invoke();

                OnEffectHit.Invoke();
            }
        }
    }
Ejemplo n.º 2
0
        public override void Register()
        {
            foreach (var holder in scriptHolders)
            {
                switch (holder.GetEventType())
                {
                case SmartEvents.SpellEffectHit:
                    OnEffectHit.Add(new EffectHandler(HandleEffectHit, holder.Event.spell.effIndex, SpellEffectName.ScriptEffect));
                    OnEffectHit.Add(new EffectHandler(HandleEffectHit, holder.Event.spell.effIndex, SpellEffectName.Dummy));
                    break;

                case SmartEvents.SpellEffectHitTarget:
                    OnEffectHitTarget.Add(new EffectHandler(HandleEffectHitTarget, holder.Event.spell.effIndex, SpellEffectName.ScriptEffect));
                    OnEffectHitTarget.Add(new EffectHandler(HandleEffectHitTarget, holder.Event.spell.effIndex, SpellEffectName.Dummy));
                    break;
                }
            }
        }
Ejemplo n.º 3
0
 public override void Register()
 {
     OnEffectHit.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.Dummy));
     OnCheckCast.Add(new CheckCastHandler(CheckIfCorpseNear));
 }
Ejemplo n.º 4
0
 public override void Register()
 {
     OnEffectHit.Add(new EffectHandler(TriggerFireBomb, 0, SpellEffectName.TriggerMissile));
 }
Ejemplo n.º 5
0
 public override void Register()
 {
     OnEffectHit.Add(new EffectHandler(HandleEffectDummy, 0, SpellEffectName.Dummy));
 }
Ejemplo n.º 6
0
 public override void Register()
 {
     OnEffectHit.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.ScriptEffect));
 }
Ejemplo n.º 7
0
 public override void Register()
 {
     OnEffectHit.Add(new EffectHandler(RemoveAlterTimeAura, 0, SpellEffectName.Dummy));
 }
Ejemplo n.º 8
0
 public override void Register()
 {
     // add dummy effect spell handler to Last Stand
     OnEffectHit.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.Dummy));
 }
Ejemplo n.º 9
0
 public override void Register()
 {
     OnEffectHit.Add(new EffectHandler(AfterJump, 1, SpellEffectName.JumpDest));
 }
Ejemplo n.º 10
0
 public override void Register()
 {
     OnCheckCast.Add(new CheckCastHandler(CheckElevation));
     OnEffectHit.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.Dummy));
 }
Ejemplo n.º 11
0
 public override void Register()
 {
     OnObjectAreaTargetSelect.Add(new ObjectAreaTargetSelectHandler(CountTargets, 0, Targets.UnitSrcAreaAlly));
     OnEffectHit.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.Dummy));
 }