Spawn distance indicator on attack, destroy after 0.5s

This commit is contained in:
2024-10-22 13:09:57 -07:00
parent 175dbbe7c5
commit 40801e4df5
5 changed files with 119 additions and 111 deletions

View File

@@ -46,6 +46,7 @@ public class Teo : MonoBehaviour
if (Time.fixedTime-lastAttackTime < attackCooldownSeconds) {
return;
}
Instantiate(distanceIndicator, transform);
// Get all objects in range in the direction of cursor
RaycastHit2D[] hits = Physics2D.CircleCastAll(
transform.position,