Dong_Minh_Doxygen
|
Bullet Class Reference
Inheritance diagram for Bullet:

Collaboration diagram for Bullet:

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
Member Function Documentation
◆ OnCollisionEnter()
|
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
-
hit Determine whether there was collision to get gameObject health Get 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
