Пример #1
0
 private void TargetParticleUpdater()
 {
     if (CurrentTarget == null)
     {
         ParticleManager.RemoveParticle("TargetParticle");
     }
     else
     {
         ParticleManager.CreateTargetLineParticle("TargetParticle", localHero, CurrentTarget.Position, Color.Aqua);
     }
 }
Пример #2
0
        private void TargetUpdater()
        {
            CurrentTarget = GetNearestToMouse();

            if (CurrentTarget == null)
            {
                if (!context.LockedTarget.Value)
                {
                    UpdateManager.DestroyIngameUpdate(TargetParticleUpdater);
                }

                ParticleManager.RemoveParticle("TargetParticle");
            }
            else
            {
                if (context.LockedTarget.Value)
                {
                    UpdateManager.DestroyIngameUpdate(TargetUpdater);
                    UpdateManager.CreateIngameUpdate(25, TargetParticleUpdater);
                }

                ParticleManager.CreateTargetLineParticle("TargetParticle", localHero, CurrentTarget.Position, Color.Aqua);
            }
        }