- Edited
So I've been making two enemies for my game and they've worked fine by themselves, but when I tried to run the game with two of them in my level, it freezes for around a half second whenever either of them change states. There's a few things that I think could be causing it but I'm not completely sure if any of them are the real issue. It could be caused by both enemies using the same state, but the game freezes when they're in different states too. It could also be that they're both trying to use the state machine at the same time, but I tried offsetting their timing and still had the issue. I'm pretty stumped, does anyone else know why this is happening? Here's a screenshot of how my state machine works.