C# 클래스 CatchThrowV2, goalBall

CatchThrowV2 This script controls the catching and trowing of the ball and the networked capabilities associated with those actions.
상속: NetworkBehaviour
파일 보기 프로젝트 열기: DrexelGoalBall/goalBall 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
ThrowDirection GameObject
aim GameObject
aimSpeed float
ball GameObject
maxHighAngle float
maxLeftAngle float
maxLowAngle float
maxRightAngle float
pickupDistance float
throwForce float

공개 메소드들

메소드 설명
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.

비공개 메소드들

메소드 설명
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

메소드 상세

Aim() 공개 메소드

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

ApplyForceToBall() 공개 메소드

Throws the ball from a given player at a given position.
public ApplyForceToBall ( Vector3 Force ) : void
Force Vector3
리턴 void

CatchBall() 공개 메소드

Makes the calls to Catch the ball.
public CatchBall ( ) : void
리턴 void

ChangeBallHold() 공개 메소드

Changes whos has the ball in a given game.
public ChangeBallHold ( bool held ) : void
held bool
리턴 void

ChargeBall() 공개 메소드

Makes the calls to charge the ball.
public ChargeBall ( ) : void
리턴 void

Drop() 공개 메소드

Detect when the ball is dropped.
public Drop ( ) : void
리턴 void

FPSAim() 공개 메소드

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
리턴 void

FixedUpdate() 공개 메소드

Increments the value of the charging variable.
public FixedUpdate ( ) : void
리턴 void

ResetAim() 공개 메소드

Resets the aim to the initial aim on a button click.
public ResetAim ( ) : void
리턴 void

Start() 공개 메소드

This function initializes all of the variables needed for the script.
public Start ( ) : void
리턴 void

ThrowBall() 공개 메소드

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

Update() 공개 메소드

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
리턴 void

stiffAim() 공개 메소드

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
리턴 void

프로퍼티 상세

ThrowDirection 공개적으로 프로퍼티

public GameObject ThrowDirection
리턴 GameObject

aim 공개적으로 프로퍼티

public GameObject aim
리턴 GameObject

aimSpeed 공개적으로 프로퍼티

public float aimSpeed
리턴 float

ball 공개적으로 프로퍼티

public GameObject ball
리턴 GameObject

maxHighAngle 공개적으로 프로퍼티

public float maxHighAngle
리턴 float

maxLeftAngle 공개적으로 프로퍼티

public float maxLeftAngle
리턴 float

maxLowAngle 공개적으로 프로퍼티

public float maxLowAngle
리턴 float

maxRightAngle 공개적으로 프로퍼티

public float maxRightAngle
리턴 float

pickupDistance 공개적으로 프로퍼티

public float pickupDistance
리턴 float

throwForce 공개적으로 프로퍼티

public float throwForce
리턴 float