The Cave

Here’s my game, “The Cave”. There’s multiple endings, mostly involving your death. Let me know what y’all think!

I’ve run into a bug I can’t seem to get to the bottom of. One of my states is being overwritten by another. I’ve followed the chain of events, drawing it all out on paper, and everything seems correct. It just doesn’t seem to work.

edit: Upon further inspection, the console in Unity says a state that doesn’t even exist is being called on. How? I renamed the state I had issues with from SmokeRifle to RifleSmoke just to test. After saving and restarting the game, Unity is still calling SmokeRifle even though there are no instances of it in my code anymore.

edit2: Somehow fixed it by copy and pasting my whole code into a new TextController.cs, deleted the old one and plugged in the new one. All fixed. Can anyone explain why that happened?