Hello. I am happy to see FlashPunk community to be up and running again.
For the past few weeks I am slowly working on a platformer type game with brawl elements, and for that i need to have multiple entities, from the same class. My problem is that i can’t get my head around of how to create multiple entities, using the same class, but so that i can access each and one of those entities (in this case Enemy entities). So for example - when Player attacks enemy (collision && Input.check) it calls function Enemy.receivedmg();. But that means that it kills all of the enemy entities on the screen, not just the one i was colliding with.
I did check out the “Accessing entities” tutorial, but i still didn’t get it how it should be done. Should i create an array and somehow check with which of those enemies from the array is the player colliding with? Or are there some general guidelines of how this is being done?