// 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(); } } }
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; } } }
public override void Register() { OnEffectHit.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.Dummy)); OnCheckCast.Add(new CheckCastHandler(CheckIfCorpseNear)); }
public override void Register() { OnEffectHit.Add(new EffectHandler(TriggerFireBomb, 0, SpellEffectName.TriggerMissile)); }
public override void Register() { OnEffectHit.Add(new EffectHandler(HandleEffectDummy, 0, SpellEffectName.Dummy)); }
public override void Register() { OnEffectHit.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.ScriptEffect)); }
public override void Register() { OnEffectHit.Add(new EffectHandler(RemoveAlterTimeAura, 0, SpellEffectName.Dummy)); }
public override void Register() { // add dummy effect spell handler to Last Stand OnEffectHit.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.Dummy)); }
public override void Register() { OnEffectHit.Add(new EffectHandler(AfterJump, 1, SpellEffectName.JumpDest)); }
public override void Register() { OnCheckCast.Add(new CheckCastHandler(CheckElevation)); OnEffectHit.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.Dummy)); }
public override void Register() { OnObjectAreaTargetSelect.Add(new ObjectAreaTargetSelectHandler(CountTargets, 0, Targets.UnitSrcAreaAlly)); OnEffectHit.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.Dummy)); }