protected override void AddObstacle() { this.targetableObstacle = new TargetableProjectileObstacle(this); this.Pathfinder.AddObstacle(this.targetableObstacle); this.stormHammerAoeObstacle = new StormHammerAoeObstacle(this) { Id = this.targetableObstacle.Id, EndCastTime = this.EndCastTime, EndObstacleTime = this.EndCastTime + (this.RangedAbility.Range / this.RangedAbility.Speed) }; this.Pathfinder.AddObstacle(this.stormHammerAoeObstacle); }
public override void AddProjectile(TrackingProjectile projectile, Unit9 target) { if (this.targetableObstacle != null && this.EndCastTime + 0.5f > GameManager.RawGameTime) { this.targetableObstacle.AddProjectile(projectile, target); this.stormHammerAoeObstacle.AddProjectile(projectile, target); } else { var projectileObstacle = new ProjectileObstacle(this, projectile, target); this.Pathfinder.AddObstacle(projectileObstacle); var aoeObstacle = new StormHammerAoeObstacle(this, projectile, target); this.Pathfinder.AddObstacle(aoeObstacle); } }