FXGLGames icon indicating copy to clipboard operation
FXGLGames copied to clipboard

Tower Defense towerbase

Open darkshadest opened this issue 2 years ago • 2 comments

Hi Almas,

How are you initializing the towerbases in tower defense?

Screenshot 2023-04-23 at 19 00 27

I was making my own version of zombs.io and was wondering how to set the onClick for an object made in the tmx?

darkshadest avatar Apr 24 '23 00:04 darkshadest

@AlmasB

darkshadest avatar Apr 24 '23 00:04 darkshadest

The .tmx objects are parsed via the EntityFactory's related method, i.e. the one marked with the correct type / class in @Spawns(). There you can use onClick as above.

AlmasB avatar Apr 24 '23 18:04 AlmasB