Hello Ladies and Guys
SetPixel() method from Image class throws an AccessViolationException in my poor Super Mario Game, and that had never happened before. I tried to think why it happens, and thought maybe it could be because the image which pixels are drawn to is inside a Texture that is currently in use in the game. But why now, if it had never happened before? The issue occurs when Mario hits a block and it remains out of items (coins, mushrooms, etc), that the program stops drawing the "animated" block and draws the empty hard block (draws on the level image that is in memory) and sets the level hardness attributes of all its pixels to SOLID. And this happens not at the first block, but at the 5th or 6th.
Any help will be appreciated