Last active
June 30, 2019 10:44
-
-
Save olegknyazev/33a83317d77144f23ac45eaceab71776 to your computer and use it in GitHub Desktop.
An example of up-bottom naming in Turret
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void ATurret::Tick(float DeltaSeconds) { | |
... | |
TimeSinceLastTargetUpdate += DeltaSeconds; | |
if (TimeSinceLastTargetUpdate >= TargetSearchInterval) { | |
TimeSinceLastTargetUpdate = 0.f; | |
CurrentTarget = FindBestTarget(); | |
} | |
} | |
AActor* ATurret::FindBestTarget() { | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment