RafaelBarbosatec/bonfire

[Bug]: drag bug in tower defense game

Closed this issue · 1 comments

What happened?

in the tower defense game when 2 defenders are placed close to each other they drag as 1 and if 2 or more defenders are place at the same spot there is no way of separating them.

Steps to reproduce?

1. use an exact copy the tower defense Github
2. when 2 defenders are placed next to each other the next time you try to drag 1 they both drag together. (some times you need to grab the second one placed for it to happen)
3. if 2 defenders are one the same spot there is no way to grab just one.

What did you expect to happen?

asking for help on Discord - bonfire Spydon thinks it should be enough by returning true onDragStart to only drag the top most component and said it maybe a bug. maybe something forgotten when converted to the "new" Flame input system.

Bonfire version

3.7.0 then also upgraded to 3.10.3

Relevant log output

No response

Hi @flea-Bear !
You can fix it do some logic in the mixin 'EndDragInTile'. And adds a hitbox in the defenders.
Take a look:
RafaelBarbosatec/bonfire_tower_defence@064c0ab