hey,
I would like to play an animation when a crit hit happens on my game im working on. This is the script that I have so far.
tapToFishButton.GetComponent ().Play = fishingCritHitAnim;
here is a look at the whole statement i have.
if(Random.value <= GameController.control.shrimpFishingCritChance)
{
tapToFishButton.GetComponent<Animation> ().Play = fishingCritHitAnim;
Debug.Log ("Crit Hit Fishing!");
GameController.control.shrimp += GameController.control.shrimpPerTap;
}
but i get an error saying
Assets/Assets/Scripts/TapToFish.cs(80,84): error CS0131: The left-hand side of an assignment must be a variable, a property or an indexer
So I understand i need to put something else on the left hand side of the script, but i am unsure what that would be. Any ideas? thanks!