Méthode | Description | |
---|---|---|
AllPlayersAtHome ( ) : bool |
Determines if any of the team are not located within their home region
|
|
CalculateClosestOpponentToGoal ( ) : void |
Calculates the closest opponent to this teams goal
|
|
CalculateClosestPlayerToBall ( ) : void |
sets _playerClosestToBall to the player closest to the ball
|
|
CanShoot ( |
||
CanShoot ( |
Given a ball position, a kicking power and a reference to a vector2D this function will sample random positions along the opponent's goal- mouth and check to see if a goal can be scored if the ball was to be kicked in that direction with the given power. If a possible shot is found, the function will immediately return true, with the target position stored in the vector ShotTarget.
|
|
DetermineBestSupportingAttacker ( ) : |
calculate the closest player to the SupportSpot
|
|
DetermineBestSupportingPosition ( ) : void |
Calculates the best supporting position
|
|
FindPass ( |
The best pass is considered to be the pass that cannot be intercepted by an opponent and that is as far forward of the receiver as possible
|
|
FindPlayerById ( int playerId ) : |
Finds a player by its id
|
|
GetBestPassToReceiver ( |
Three potential passes are calculated. One directly toward the receiver's current position and two that are the tangents from the ball position to the circle of radius 'range' from the receiver. These passes are then tested to see if they can be intercepted by an opponent and to make sure they terminate within the playing area. If all the passes are invalidated the function returns false. Otherwise the function returns the pass that takes the ball closest to the opponent's goal area.
|
|
GetSupportSpot ( ) : |
||
IsOpponentWithinRadius ( |
returns true if an opposing player is within the radius of the position given as a parameter
|
|
IsPassSafeFromAllOpponents ( |
Tests a pass from position 'from' to position 'target' against each member of the opposing team. Returns true if the pass can be made without getting intercepted
|
|
IsPassSafeFromOpponent ( |
test if a pass from 'from' to 'to' can be intercepted by an opposing player
|
|
Render ( |
Render the soccer team
|
|
RequestPass ( |
This tests to see if a pass is possible between the requester and the controlling player. If it is possible a message is sent to the controlling player to pass the ball asap.
|
|
ReturnAllFieldPlayersToHome ( ) : void |
sends a message to all players to return to their home areas forthwith
|
|
SetPlayerHomeRegion ( int playerId, int region ) : void |
Sets a particular players home region index
|
|
SoccerTeam ( |
||
Update ( ) : void |
Called every tick to update the team state
|
|
UpdateTargetsOfWaitingPlayers ( ) : void |
Finds targets for waiting players
|
Méthode | Description | |
---|---|---|
CreatePlayers ( ) : void |
Create the players for the team
|
|
LostControl ( ) : void |
public CalculateClosestOpponentToGoal ( ) : void | ||
Résultat | void |
public CalculateClosestPlayerToBall ( ) : void | ||
Résultat | void |
public CanShoot ( |
||
BallPos | ||
power | double | |
Résultat | bool |
public CanShoot ( |
||
BallPos | ||
power | double | |
ShotTarget | ||
Résultat | bool |
public DetermineBestSupportingAttacker ( ) : |
||
Résultat |
public DetermineBestSupportingPosition ( ) : void | ||
Résultat | void |
public FindPass ( |
||
passer | ||
receiver | ||
PassTarget | ||
power | double | |
MinPassingDistance | double | |
Résultat | bool |
public FindPlayerById ( int playerId ) : |
||
playerId | int | |
Résultat |
public GetBestPassToReceiver ( |
||
passer | ||
receiver | ||
PassTarget | ||
power | double | |
Résultat | bool |
public IsOpponentWithinRadius ( |
||
pos | ||
rad | double | |
Résultat | bool |
public IsPassSafeFromAllOpponents ( |
||
from | ||
target | ||
receiver | ||
PassingForce | double | |
Résultat | bool |
public IsPassSafeFromOpponent ( |
||
from | ||
target | ||
receiver | ||
opp | ||
PassingForce | double | |
Résultat | bool |
public RequestPass ( |
||
requester | ||
Résultat | void |
public ReturnAllFieldPlayersToHome ( ) : void | ||
Résultat | void |
public SetPlayerHomeRegion ( int playerId, int region ) : void | ||
playerId | int | |
region | int | |
Résultat | void |
public SoccerTeam ( |
||
homeGoal | ||
opponentsGoal | ||
pitch | ||
color | SoccerTeamColor | |
Résultat | System |
public UpdateTargetsOfWaitingPlayers ( ) : void | ||
Résultat | void |