Where to slide to destroy something

Game development with Board Game Arena Studio
Post Reply
User avatar
HumanBot
Posts: 11
Joined: 29 March 2020, 07:43

Where to slide to destroy something

Post by HumanBot » 10 January 2021, 21:46

So I ended up using the Zone class to build out each player's public hand. Not sure if that was the intended use of zone as I'm using a zone for each card type, but I decided to use it for now since each card type were a different size, had varying number of cards, and I needed a different way to organize between some of the types.

Now zone uses a function called .removeFromZone() which can remove the item from my zone by sliding it and destroy it, but it must have a sliding destination. Is there a garbage can location people normally use like the corner of the map or some symbol? Alternatively, a fadeOut option would work better, but I'm not sure how I'd change the zone functionality to do that.

User avatar
HumanBot
Posts: 11
Joined: 29 March 2020, 07:43

Re: Where to slide to destroy something

Post by HumanBot » 10 January 2021, 21:56

Actually I just came up with a cool idea that solves this. I do "removeFromZone" on the card with the destination set to its own zone. Then I do a fadeOutAndDestroy on that object. The result is the item slides up slightly as it fades away. Pretty cool.

User avatar
Loreroth
Posts: 18
Joined: 05 August 2014, 07:28

Re: Where to slide to destroy something

Post by Loreroth » 13 January 2021, 05:38

You can simply use null as the destination, it will then fade out and destroy the object in place.

User avatar
HumanBot
Posts: 11
Joined: 29 March 2020, 07:43

Re: Where to slide to destroy something

Post by HumanBot » 13 January 2021, 23:22

Ah okay thanks. That's good to know

Post Reply

Return to “Developers”