C# Class CatchThrowV2, goalBall

CatchThrowV2 This script controls the catching and trowing of the ball and the networked capabilities associated with those actions.
Inheritance: NetworkBehaviour
Afficher le fichier Open project: DrexelGoalBall/goalBall Class Usage Examples

Méthodes publiques

Свойство Type Description
ThrowDirection GameObject
aim GameObject
aimSpeed float
ball GameObject
maxHighAngle float
maxLeftAngle float
maxLowAngle float
maxRightAngle float
pickupDistance float
throwForce float

Méthodes publiques

Méthode Description
Aim ( float Horizontal, float Vertical ) : void

Changes where the player is looking based on the provided values.

ApplyForceToBall ( Vector3 Force ) : void

Throws the ball from a given player at a given position.

CatchBall ( ) : void

Makes the calls to Catch the ball.

ChangeBallHold ( bool held ) : void

Changes whos has the ball in a given game.

ChargeBall ( ) : void

Makes the calls to charge the ball.

Drop ( ) : void

Detect when the ball is dropped.

FPSAim ( float xAim, float yAim ) : void

Classic first person shooter aiming that allows the palyers to look around and not have their view reset to the origonal position.

FixedUpdate ( ) : void

Increments the value of the charging variable.

ResetAim ( ) : void

Resets the aim to the initial aim on a button click.

Start ( ) : void

This function initializes all of the variables needed for the script.

ThrowBall ( ) : void

Makes the call to throw the ball. Differentiates calls depending on whether the player is hosing or a client.

Update ( ) : void

Detects the distance between the player and the ball and determines if the player is in range to pick up the ball. DEBUGGING: can be used to change the player controls when the M key is pressed.

stiffAim ( float xAim, float yAim ) : void

Stiff aim is when the player uses the control stick to change the direction of the ball from the center of their initial view. When the control stick is released the aim will center.

Private Methods

Méthode Description
CmdBallPickup ( bool held ) : void
CmdBallThrow ( Vector3 pForce ) : void
DropIfHolding ( bool drop ) : void

If the player is holding the ball and it needs to be dropped it will drop it.

TransmitBallPickup ( bool held ) : void
TransmitBallThrow ( Vector3 pForce ) : void
delayControl ( ) : bool

Delays the control to prevent multiple messages being sent to the server too quickly

Method Details

Aim() public méthode

Changes where the player is looking based on the provided values.
public Aim ( float Horizontal, float Vertical ) : void
Horizontal float
Vertical float
Résultat void

ApplyForceToBall() public méthode

Throws the ball from a given player at a given position.
public ApplyForceToBall ( Vector3 Force ) : void
Force Vector3
Résultat void

CatchBall() public méthode

Makes the calls to Catch the ball.
public CatchBall ( ) : void
Résultat void

ChangeBallHold() public méthode

Changes whos has the ball in a given game.
public ChangeBallHold ( bool held ) : void
held bool
Résultat void

ChargeBall() public méthode

Makes the calls to charge the ball.
public ChargeBall ( ) : void
Résultat void

Drop() public méthode

Detect when the ball is dropped.
public Drop ( ) : void
Résultat void

FPSAim() public méthode

Classic first person shooter aiming that allows the palyers to look around and not have their view reset to the origonal position.
public FPSAim ( float xAim, float yAim ) : void
xAim float
yAim float
Résultat void

FixedUpdate() public méthode

Increments the value of the charging variable.
public FixedUpdate ( ) : void
Résultat void

ResetAim() public méthode

Resets the aim to the initial aim on a button click.
public ResetAim ( ) : void
Résultat void

Start() public méthode

This function initializes all of the variables needed for the script.
public Start ( ) : void
Résultat void

ThrowBall() public méthode

Makes the call to throw the ball. Differentiates calls depending on whether the player is hosing or a client.
public ThrowBall ( ) : void
Résultat void

Update() public méthode

Detects the distance between the player and the ball and determines if the player is in range to pick up the ball. DEBUGGING: can be used to change the player controls when the M key is pressed.
public Update ( ) : void
Résultat void

stiffAim() public méthode

Stiff aim is when the player uses the control stick to change the direction of the ball from the center of their initial view. When the control stick is released the aim will center.
public stiffAim ( float xAim, float yAim ) : void
xAim float
yAim float
Résultat void

Property Details

ThrowDirection public_oe property

public GameObject ThrowDirection
Résultat GameObject

aim public_oe property

public GameObject aim
Résultat GameObject

aimSpeed public_oe property

public float aimSpeed
Résultat float

ball public_oe property

public GameObject ball
Résultat GameObject

maxHighAngle public_oe property

public float maxHighAngle
Résultat float

maxLeftAngle public_oe property

public float maxLeftAngle
Résultat float

maxLowAngle public_oe property

public float maxLowAngle
Résultat float

maxRightAngle public_oe property

public float maxRightAngle
Résultat float

pickupDistance public_oe property

public float pickupDistance
Résultat float

throwForce public_oe property

public float throwForce
Résultat float