Quantcast
Channel: Questions in topic: "enemy"
Viewing all articles
Browse latest Browse all 1488

Enemy attacking to fast

$
0
0
So I have this enemy there is going to throw stone but I have that one problem that it throws all of it stone at once and I want it to wait between each throw can someone help me? { TargetFinder(); if (myTarget == null) currentTargetDistance = searchRadius; else Move(myTarget.transform); { if (currentStones > 0) { if (currentTargetDistance <= throwRadius) { DoThrow(); MoveSpeed = 0f; } } void DoThrow() { myTarget = null; currentTargetDistance = searchRadius; Instantiate(Stone, new Vector3(), Quaternion.identity); currentStones--; } }

Viewing all articles
Browse latest Browse all 1488

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>