Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

Stack Overflow help

$
0
0
Hello I have a method called Atttack() that is responsible for playing the attack animation of my player but its causing a stack overflow in my if statement. private void Attack() { Weapon currentWeapon = handsInv.GetItem(manager.currentlyEquipedWeapon); if(Time.time > lastClickTime + currentWeapon.attackRate) { anim.SetTrigger("clickedAttack"); lastClickTime = Time.time; } } It points to the if statement of Time.time > lastClickTime + currentWeapon.attackRate where lastClickTime is a private float attackRate is an integer from my Weapon class. Anyone know how to fix? thanks!

Viewing all articles
Browse latest Browse all 2891

Trending Articles



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