I´ve got one sprite; its size, speed and hp is measured through its animation frame directly, so don´t worry about any of that. I want to make it so when this sprite overlaps other of its kind, both get compared to each other and the one with the biggest or equal animation sprite gets added the number of the other´s animation frame (if the biggest´s animation frame is smaller than 8, if its animation frame is 8 nothing will happen). In the end the smallest of the two will be deleted.
Examples:
·Sprite (frame=0) + Sprite (frame=0) = Sprite (frame=1)
·Sprite (frame=1) + Sprite (frame=2) = Sprite (frame=3) etc...
I know it sounds simple, and I think it is, but I´ve been thinking for a while, and even though code I made kind of works I know it´s not the correct way of approaching it...
Any help would be greatly appreciated.