My project - https://drive.google.com/file/d/17OQLIuJSWCvUbeZqJMcTm0_08MJCVi4o/view?usp=sharing
I needed that when I clicked on a sprite, the sprite would be deleted and its value in the array would change to 0.
Example: the ground sprite in the array has two values, and I need that when I click on the ground sprite, it is removed and in the array I have the entire value at 0
Develop games in your browser. Powerful, performant & highly capable.
It's unavoidable that you need to associate the sprite to array by their ID or instance variable.