Ejemplo n.º 1
0
        public void AddParticle(ParticleEffect particle, string name)
        {
            var time = Game.RawGameTime - (Game.Ping / 2000);

            UpdateManager.BeginInvoke(
                () =>
            {
                try
                {
                    if (!particle.IsValid)
                    {
                        return;
                    }

                    var position = particle.GetControlPoint(0);
                    var obstacle = new AreaOfEffectSpeedObstacle(this, position, 200, 200)
                    {
                        EndCastTime     = time,
                        EndObstacleTime = time + (this.ActiveAbility.Radius / this.ActiveAbility.Speed)
                    };

                    this.Pathfinder.AddObstacle(obstacle);
                }
                catch (Exception e)
                {
                    Logger.Error(e);
                }
            });
        }
Ejemplo n.º 2
0
        protected override void AddObstacle()
        {
            var obstacle = new AreaOfEffectSpeedObstacle(this, this.Owner.Position, 300, 150)
            {
                EndCastTime     = this.EndCastTime,
                EndObstacleTime = this.EndCastTime + (this.ActiveAbility.Radius / this.ActiveAbility.Speed)
            };

            this.Pathfinder.AddObstacle(obstacle);
        }
Ejemplo n.º 3
0
        public void AddParticle(ParticleEffect particle, string name)
        {
            var time = Game.RawGameTime - (Game.Ping / 2000);

            var obstacle = new AreaOfEffectSpeedObstacle(this, particle.GetControlPoint(0), 300)
            {
                EndCastTime     = time,
                EndObstacleTime = time + (this.ActiveAbility.Radius / this.ActiveAbility.Speed)
            };

            this.Pathfinder.AddObstacle(obstacle);
        }