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); } }); }
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); }
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); }