Closed JEphron closed 8 years ago
Hey, thanks for the hint. I could reproduce the array out of range issue and fixed it 511235b7333493c98c248bb21046583807725b4f
but I couldn't reproduce what you said with dragging downwards... Maybe the my fix also fixes that :)
I just updated Match-One to use Entitas 0.32.0. I completely replaced the GameBoardCache with the new EntityIndex feature. This most likely fixes this issue.
When in burst mode it's easy to crash the game by simply dragging downwards. This happens because in ProcessInputSystem.cs:18
entities.SingleEntity();
is called, but in InputController.cs:16 many entities withInput
components are created beforeProcessInputSystem
has a chance to clear them.I don't know what the framework-correct way to fix this is, but iterating over the entities array in
ProcessInputSystem
instead of callingSingleEntity()
fixes the problem (but raises another bug whereby you can get anArrayIndexOutOfRangeException
, which could probably be fixed with a bounds-check, but anyway), so I'll just leave this as an issue since maybe there's a more correct way of doing it.