C# Class BallReset, goalBall

This script resets the ball to the proper position. It will put the ball infront of one of the players on the team who is going to get the ball. This could be due to a penalty or a goal.
Inheritance: MonoBehaviour
Afficher le fichier Open project: DrexelGoalBall/goalBall Class Usage Examples

Méthodes publiques

Свойство Type Description
Ball GameObject
BlueSideCenter GameObject
BlueSideLeft GameObject
BlueSideRight GameObject
RedSideCenter GameObject
RedSideLeft GameObject
RedSideRight GameObject

Méthodes publiques

Méthode Description
Start ( ) : void

Used to initize variables

placeBallBSC ( ) : void

Places the ball at the location of the Blue Side Center ball spawn.

placeBallBSL ( ) : void

Places the ball at the location of the Blue Side Left ball spawn.

placeBallBSR ( ) : void

Places the ball at the location of the Blue Side Right ball spawn.

placeBallRSC ( ) : void

Places the ball at the location of the Red Side Center ball spawn.

placeBallRSL ( ) : void

Places the ball at the location of the Red Side Left ball spawn.

placeBallRSR ( ) : void

Places the ball at the location of the Red Side Right ball spawn.

resetToClosestPoint ( bool redTeamPositions ) : void

Places ball at the location it is closest to

Private Methods

Méthode Description
StopBall ( ) : void

Stops the ball, getting rid of all of the velocity, both directional and rotational. Used to make sure the ball doesn't keep moving after it is moved.

Method Details

Start() public méthode

Used to initize variables
public Start ( ) : void
Résultat void

placeBallBSC() public méthode

Places the ball at the location of the Blue Side Center ball spawn.
public placeBallBSC ( ) : void
Résultat void

placeBallBSL() public méthode

Places the ball at the location of the Blue Side Left ball spawn.
public placeBallBSL ( ) : void
Résultat void

placeBallBSR() public méthode

Places the ball at the location of the Blue Side Right ball spawn.
public placeBallBSR ( ) : void
Résultat void

placeBallRSC() public méthode

Places the ball at the location of the Red Side Center ball spawn.
public placeBallRSC ( ) : void
Résultat void

placeBallRSL() public méthode

Places the ball at the location of the Red Side Left ball spawn.
public placeBallRSL ( ) : void
Résultat void

placeBallRSR() public méthode

Places the ball at the location of the Red Side Right ball spawn.
public placeBallRSR ( ) : void
Résultat void

resetToClosestPoint() public méthode

Places ball at the location it is closest to
public resetToClosestPoint ( bool redTeamPositions ) : void
redTeamPositions bool True if checking red positions, False if checking blue positions
Résultat void

Property Details

Ball public_oe property

public GameObject Ball
Résultat GameObject

BlueSideCenter public_oe property

public GameObject BlueSideCenter
Résultat GameObject

BlueSideLeft public_oe property

public GameObject BlueSideLeft
Résultat GameObject

BlueSideRight public_oe property

public GameObject BlueSideRight
Résultat GameObject

RedSideCenter public_oe property

public GameObject RedSideCenter
Résultat GameObject

RedSideLeft public_oe property

public GameObject RedSideLeft
Résultat GameObject

RedSideRight public_oe property

public GameObject RedSideRight
Résultat GameObject