Dong_Minh_Doxygen: Bullet Class Reference

Dong Minh

Dong_Minh_Doxygen
Inheritance diagram for Bullet:
Inheritance graph
Collaboration diagram for Bullet:
Collaboration graph

Private Member Functions

void OnCollisionEnter (Collision collision)
 When there is a collision detection from the enemy bullet to the player's tank. If it collides with each other, the player will take damage More...
 

Detailed Description

Definition at line 5 of file Bullet.cs.

Member Function Documentation

◆ OnCollisionEnter()

void Bullet.OnCollisionEnter ( Collision  collision)
private

When there is a collision detection from the enemy bullet to the player's tank. If it collides with each other, the player will take damage

Pseudo Code
If there is a detected collision between two objects
Get the health component for the tank
If it is not equal to null, player takes 1 damage
The enemy bullet object will be destroyed after
Parameters
hitDetermine whether there was collision to get gameObject
healthGet Health Component
Returns
Returns if collision detected to update player's health and destroy enemy bullet

Definition at line 28 of file Bullet.cs.

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • D:/Google Drive/Unity Projects/Tank Game/Assets/Scripts/Bullet.cs
Generated by   doxygen 1.8.13