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
Show file Open project: DrexelGoalBall/goalBall Class Usage Examples

Public Properties

Property Type Description
Ball GameObject
BlueSideCenter GameObject
BlueSideLeft GameObject
BlueSideRight GameObject
RedSideCenter GameObject
RedSideLeft GameObject
RedSideRight GameObject

Public Methods

Method 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

Method 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 method

Used to initize variables
public Start ( ) : void
return void

placeBallBSC() public method

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

placeBallBSL() public method

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

placeBallBSR() public method

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

placeBallRSC() public method

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

placeBallRSL() public method

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

placeBallRSR() public method

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

resetToClosestPoint() public method

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
return void

Property Details

Ball public property

public GameObject Ball
return GameObject

BlueSideCenter public property

public GameObject BlueSideCenter
return GameObject

BlueSideLeft public property

public GameObject BlueSideLeft
return GameObject

BlueSideRight public property

public GameObject BlueSideRight
return GameObject

RedSideCenter public property

public GameObject RedSideCenter
return GameObject

RedSideLeft public property

public GameObject RedSideLeft
return GameObject

RedSideRight public property

public GameObject RedSideRight
return GameObject