![]() |
FCV Engine 0.1
A tool and framework for tutorials in game development
|
A component that uses OverlapCircle method in Physics2D to deal damage against objects with Health component and in assigned LayerMask. More...
Public Member Functions | |
| void | SetAttackCooldown (float time) |
| Sets the current cooldown to provided one if time is greater than current cooldown. | |
Private Member Functions | |
| void | LateUpdate () |
| Checks for last position and in which direction the damager object is moving. | |
| void | FixedUpdate () |
| Controls cooldown functionality and does the OverlapCircle check and then sends the Collider2D to CollisionChecks() | |
| void | DealDamage (Health health) |
| Deals damage to Health component. | |
| void | CollisionChecks (Collider2D other) |
| Checks if all requirments are met when collider is hit with overlap check and deals damage if success. | |
A component that uses OverlapCircle method in Physics2D to deal damage against objects with Health component and in assigned LayerMask.
Definition at line 9 of file Damager.cs.
|
private |
Checks if all requirments are met when collider is hit with overlap check and deals damage if success.
| other | collider2D to check against |
Definition at line 98 of file Damager.cs.
|
private |
Deals damage to Health component.
| health | Health component to deal damage against |
Definition at line 70 of file Damager.cs.
| void SetAttackCooldown | ( | float | time | ) |
Sets the current cooldown to provided one if time is greater than current cooldown.
| time | cooldown time |
Definition at line 87 of file Damager.cs.