Dong_Minh_Doxygen: PlayerController Class Reference

Dong Minh

Dong_Minh_Doxygen
Inheritance diagram for PlayerController:
Inheritance graph
Collaboration diagram for PlayerController:
Collaboration graph

Public Attributes

Transform SteeringLeft
 
Transform SteeringRight
 
float TankSpeed
 
float RotationSpeed
 
float CannonSpeed
 
float FrontWheelRotation
 
float BackWheelRotation
 
float horizontal
 

Private Member Functions

void Start ()
 Initalize at the beginning of the game More...
 
void Update ()
 Update is called once per frame More...
 
void HorizontalWheel ()
 The front wheels will go either rotate left or right by 45 degrees. More...
 
void FrontWheelMovement ()
 The Front wheels should rotate forward/backward and should rotate with an angle of maxiumum of 45 to left and right More...
 
void WheelSteering ()
 The steering for left or right to determine how far it should also rotate. More...
 
void BackWheelMovement ()
 The back wheels should rotate and also accelerate/decelerate the tank More...
 
void CannonRotation ()
 How far the cannon should rotate up and to its rest position. Max for up position is vertical (90 degrees) More...
 
void TurretRotation ()
 Will rotate the turret left or right when the user press left or right arrow keys More...
 
void TankMovement ()
 This is called in the update function. All funcitonality is done here for the tank movement like moving forward, backwards, left, or right. More...
 
void ForwardBackward (float movement)
 When the W or S key is pressed, the tank will move forward or backward respectively More...
 
void LeftRight (float movement)
 When the A or D key is pressed, the tank will move left or right respectively More...
 

Private Attributes

GameObject Turret
 
GameObject Cannon
 
GameObject [] FrontWheels
 
GameObject [] BackWheels
 
GameObject [] FrontTurningWheels
 

Detailed Description

Definition at line 6 of file PlayerController.cs.

Member Function Documentation

◆ BackWheelMovement()

void PlayerController.BackWheelMovement ( )
private

The back wheels should rotate and also accelerate/decelerate the tank

Returns
Returns Back Wheels Rotation

Definition at line 143 of file PlayerController.cs.

Here is the caller graph for this function:

◆ CannonRotation()

void PlayerController.CannonRotation ( )
private

How far the cannon should rotate up and to its rest position. Max for up position is vertical (90 degrees)

Returns
Returns Cannon Rotation

Definition at line 176 of file PlayerController.cs.

Here is the caller graph for this function:

◆ ForwardBackward()

void PlayerController.ForwardBackward ( float  movement)
private

When the W or S key is pressed, the tank will move forward or backward respectively

Returns
Returns translate

Definition at line 315 of file PlayerController.cs.

Here is the caller graph for this function:

◆ FrontWheelMovement()

void PlayerController.FrontWheelMovement ( )
private

The Front wheels should rotate forward/backward and should rotate with an angle of maxiumum of 45 to left and right

Returns
Returns FrontWheel rotation/

Definition at line 95 of file PlayerController.cs.

Here is the caller graph for this function:

◆ HorizontalWheel()

void PlayerController.HorizontalWheel ( )
private

The front wheels will go either rotate left or right by 45 degrees.

Pseudo Code
If the input key is D, rotate the front wheels by 45 degrees
else if the input key is A, rotate by -45 degrees
Returns
Returns horizontal

Definition at line 78 of file PlayerController.cs.

Here is the caller graph for this function:

◆ LeftRight()

void PlayerController.LeftRight ( float  movement)
private

When the A or D key is pressed, the tank will move left or right respectively

Returns
Returns rotate

Definition at line 326 of file PlayerController.cs.

Here is the caller graph for this function:

◆ Start()

void PlayerController.Start ( )
private

Initalize at the beginning of the game

Definition at line 34 of file PlayerController.cs.

◆ TankMovement()

void PlayerController.TankMovement ( )
private

This is called in the update function. All funcitonality is done here for the tank movement like moving forward, backwards, left, or right.

Returns
Returns translate or rotation

Definition at line 269 of file PlayerController.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TurretRotation()

void PlayerController.TurretRotation ( )
private

Will rotate the turret left or right when the user press left or right arrow keys

Returns
Returns Turret Rotation

Definition at line 237 of file PlayerController.cs.

Here is the caller graph for this function:

◆ Update()

void PlayerController.Update ( )
private

Update is called once per frame

Definition at line 47 of file PlayerController.cs.

Here is the call graph for this function:

◆ WheelSteering()

void PlayerController.WheelSteering ( )
private

The steering for left or right to determine how far it should also rotate.

Returns
Returns Steering Left or Right rotation

Definition at line 125 of file PlayerController.cs.

Here is the caller graph for this function:

Member Data Documentation

◆ BackWheelRotation

float PlayerController.BackWheelRotation

Definition at line 26 of file PlayerController.cs.

◆ BackWheels

GameObject [] PlayerController.BackWheels
private

Definition at line 14 of file PlayerController.cs.

◆ Cannon

GameObject PlayerController.Cannon
private

Definition at line 12 of file PlayerController.cs.

◆ CannonSpeed

float PlayerController.CannonSpeed

Definition at line 24 of file PlayerController.cs.

◆ FrontTurningWheels

GameObject [] PlayerController.FrontTurningWheels
private

Definition at line 15 of file PlayerController.cs.

◆ FrontWheelRotation

float PlayerController.FrontWheelRotation

Definition at line 25 of file PlayerController.cs.

◆ FrontWheels

GameObject [] PlayerController.FrontWheels
private

Definition at line 13 of file PlayerController.cs.

◆ horizontal

float PlayerController.horizontal

Definition at line 27 of file PlayerController.cs.

◆ RotationSpeed

float PlayerController.RotationSpeed

Definition at line 23 of file PlayerController.cs.

◆ SteeringLeft

Transform PlayerController.SteeringLeft

Definition at line 16 of file PlayerController.cs.

◆ SteeringRight

Transform PlayerController.SteeringRight

Definition at line 17 of file PlayerController.cs.

◆ TankSpeed

float PlayerController.TankSpeed

Definition at line 22 of file PlayerController.cs.

◆ Turret

GameObject PlayerController.Turret
private

Definition at line 11 of file PlayerController.cs.


The documentation for this class was generated from the following file:
Generated by   doxygen 1.8.13