/// <summary> /// Keeps the combat bot around the engineer /// </summary> public Vector3 steerForFollowOwner(InfantryVehicle vehicle) { Vector3 wanderSteer = vehicle.SteerForWander(1.3f); Vector3 pursuitSteer = vehicle.SteerForPursuit(_creator._baseVehicle.Abstract, 0.2f); return((wanderSteer * 0.75f) + pursuitSteer); }
/// <summary> /// Keeps the combat bot around the engineer /// Change to keeping him around the HQ /// </summary> public Vector3 steerForFollowOwner(InfantryVehicle vehicle) { Vector3 wanderSteer = vehicle.SteerForWander(0.5f); Vector3 pursuitSteer = vehicle.SteerForPursuit(_nextRet.Abstract, 0.2f); return((wanderSteer * 1.6f) + pursuitSteer); }
/// <summary> /// Moves the AI on a persuit course towards the player, while keeping seperated from other AI /// </summary> public Vector3 steerForAttack(InfantryVehicle vehicle) { if (target == null) { return(Vector3.Zero); } List <Vehicle> soldiers = _arena.getVehiclesInRange(vehicle.state.positionX, vehicle.state.positionY, 500, delegate(Vehicle v) { return(v is Troop); }); IEnumerable <IVehicle> soldierbots = soldiers.ConvertAll <IVehicle>( delegate(Vehicle v) { return((v as Troop).Abstract); } ); Vector3 cohesionSteer = vehicle.SteerForCohesion(_seperation, 0.07f, soldierbots.ToList()); Vector3 seperationSteer = vehicle.SteerForSeparation(_seperation, -1.707f, soldierbots); Vector3 pursuitSteer = vehicle.SteerForPursuit(target._baseVehicle.Abstract, 0.2f); _bStrafe = true; return((seperationSteer * 1.3f) + pursuitSteer); }
/// <summary> /// Keeps the combat bot around the engineer /// </summary> public Vector3 steerForFollowLeader(InfantryVehicle vehicle) { if (target == null) { return(Vector3.Zero); } LvlInfo level = _arena._server._assets.Level; List <LvlInfo.Tile> tiles = Helpers.calcBresenhems(_arena, _state.positionX, _state.positionY, target._state.positionX, target._state.positionY); for (int i = 0; i <= tiles.Count - 1; i++) { int phy = tiles[i].Physics; short low = level.PhysicsLow[phy]; short high = level.PhysicsHigh[phy]; _arena.sendArenaMessage(String.Format("Height: {0} Physic: {1}", high, tiles[i].Physics)); } Vector3 pursuitSteer = vehicle.SteerForPursuit(target._baseVehicle.Abstract, 0.2f); return(pursuitSteer); }
/// <summary> /// Keeps the combat bot around the engineer /// Change to keeping him around the HQ /// </summary> public Vector3 steerForFollowOwner(InfantryVehicle vehicle) { // Vector3 wanderSteer = vehicle.SteerForWander(0.5f); Vector3 pursuitSteer = vehicle.SteerForPursuit(_home.Abstract, 0.2f); //return (wanderSteer * 1.6f) + pursuitSteer; return(pursuitSteer); }
/// <summary> /// Keeps the combat bot around the engineer /// </summary> public Vector3 steerForFollowOwner(InfantryVehicle vehicle) { if (_creator == null) { return(Vector3.Zero); } Vector3 wanderSteer = vehicle.SteerForWander(0.5f); Vector3 pursuitSteer = vehicle.SteerForPursuit(_creator._baseVehicle.Abstract, 0.2f); return((wanderSteer * 1.6f) + pursuitSteer); }
/// <summary> /// Keeps the combat bot around the engineer /// </summary> public Vector3 steerForFollowOwner(InfantryVehicle vehicle) { if (_target == null) { return(Vector3.Zero); } Vector3 wanderSteer = vehicle.SteerForWander(1.3f); Vector3 pursuitSteer = vehicle.SteerForPursuit(_target._baseVehicle.Abstract, 0.2f); return((wanderSteer * 0.75f) + pursuitSteer); }
/// <summary> /// Keeps the bot around a specific player /// </summary> public Vector3 strafeForCombat(InfantryVehicle vehicle) { if (_target == null) { return(Vector3.Zero); } Vector3 wanderSteer = vehicle.SteerForWander(0.5f); Vector3 pursuitSteer = vehicle.SteerForPursuit(_leader._baseVehicle.Abstract, 0.2f); return((wanderSteer * 1.6f) + pursuitSteer); }
/// <summary> /// Moves the bot on a persuit course towards the player, while keeping seperated from otherbots /// </summary> public Vector3 steerForPersuePlayer(InfantryVehicle vehicle) { List <Vehicle> bots = _arena.getVehiclesInRange(vehicle.state.positionX, vehicle.state.positionY, 400, delegate(Vehicle v) { return(v is Bot); }); IEnumerable <IVehicle> gbots = bots.ConvertAll <IVehicle>( delegate(Vehicle v) { return((v as Bot).Abstract); } ); Vector3 seperationSteer = vehicle.SteerForSeparation(_seperation, -0.707f, gbots); Vector3 pursuitSteer = vehicle.SteerForPursuit(targetEnemy._baseVehicle.Abstract, 0.2f); return((seperationSteer * 0.6f) + pursuitSteer); }
/// <summary> /// Keeps the combat bot around the engineer /// Change to keeping him around the HQ /// </summary> public Vector3 steerForFollowOwner(InfantryVehicle vehicle) { List <Vehicle> bots = _arena.getVehiclesInRange(vehicle.state.positionX, vehicle.state.positionY, 400, delegate(Vehicle v) { return(v is Bot); }); IEnumerable <IVehicle> gbots = bots.ConvertAll <IVehicle>( delegate(Vehicle v) { return((v as Bot).Abstract); } ); Vector3 seperationSteer = vehicle.SteerForSeparation(50f, -0.707f, gbots); //Vector3 seperationSteer = vehicle.SteerForAlignment(100f, -0.707f, gbots); // Vector3 wanderSteer = vehicle.SteerForWander(0.5f); Vector3 pursuitSteer = vehicle.SteerForPursuit(_targetVehicle.Abstract, 0.2f); return((seperationSteer * 0.6f) + pursuitSteer); }
/// <summary> /// Moves the zombie on a persuit course towards the player, while keeping seperated from other zombies /// </summary> public Vector3 steerForPersuePlayer(InfantryVehicle vehicle) { if (victim == null) { return(Vector3.Zero); } List <Vehicle> zombies = _arena.getVehiclesInRange(vehicle.state.positionX, vehicle.state.positionY, 400, delegate(Vehicle v) { return(v is ZombieBot); }); IEnumerable <IVehicle> zombiebots = zombies.ConvertAll <IVehicle>( delegate(Vehicle v) { return((v as ZombieBot).Abstract); } ); Vector3 seperationSteer = vehicle.SteerForSeparation(_seperation, -0.707f, zombiebots); Vector3 pursuitSteer = vehicle.SteerForPursuit(victim._baseVehicle.Abstract, 0.2f); return((seperationSteer * 0.6f) + pursuitSteer); }
/// <summary> /// Moves the medic on a persuit course towards the player, while keeping seperated from other medics /// </summary> public Vector3 steerForPersuePlayer(InfantryVehicle vehicle) { if (_target == null) { return(Vector3.Zero); } List <Vehicle> medics = _arena.getVehiclesInRange(vehicle.state.positionX, vehicle.state.positionY, 150, delegate(Vehicle v) { return(v is Medic); }); IEnumerable <IVehicle> medicbots = medics.ConvertAll <IVehicle>( delegate(Vehicle v) { return((v as Medic).Abstract); } ); Vector3 seperationSteer = vehicle.SteerForSeparation(_seperation, -0.307f, medicbots); Vector3 pursuitSteer = vehicle.SteerForPursuit(_target._baseVehicle.Abstract, 0.2f); return((seperationSteer * 0.3f) + pursuitSteer); }
/// <summary> /// Moves the medic on a persuit course towards the player, while keeping seperated from other medics /// </summary> public Vector3 steerForPersuePlayer(InfantryVehicle vehicle) { if (targetEnemy == null) { return(Vector3.Zero); } List <Vehicle> dropships = _arena.getVehiclesInRange(vehicle.state.positionX, vehicle.state.positionY, 500, delegate(Vehicle v) { return(v is Dropship); }); IEnumerable <IVehicle> dropshipbots = dropships.ConvertAll <IVehicle>( delegate(Vehicle v) { return((v as Dropship).Abstract); } ); Vector3 seperationSteer = vehicle.SteerForSeparation(_seperation, -0.707f, dropshipbots); Vector3 pursuitSteer = vehicle.SteerForPursuit(targetEnemy.Abstract, 0.2f); return((seperationSteer * 1.3f) + pursuitSteer); }
public Vector3 steerForSeekBot(InfantryVehicle vehicle) { Vector3 pursuitSteer = vehicle.SteerForPursuit(_botTarget.Abstract, 0.2f); return(pursuitSteer); }
/// <summary> /// Keeps the combat bot around the engineer /// Change to keeping him around the HQ /// </summary> public Vector3 steerForFollowOwner(InfantryVehicle vehicle) { Vector3 pursuitSteer = vehicle.SteerForPursuit(_targetLocation.Abstract, 0.2f); return(pursuitSteer); }