Hello,
How to interact between multiple Actor dependending on an actor state ?
For example :
I got a Touchpad Actor that handle on screen input direction (act on HUD Stage)
I got a player Actor that move using touchpad direction --> how to properly handle touchpad event ? (act on Game Stage)
I need a progress bar Actor that change value depending on player Actor state (like energy) decreasing/increasing over time --> how to properly handle player custom event ? (act on HUD Stage)
Actually, in my custom player class constructor, I pass a touchpad reference (not really well…) :
Touchpad touchpad = new Touchpad(10, skin);
PlayerActor player = new PlayerActor(touchpad);
ProgressBar progressBar = new ProgressBar(0, 100, 1, false, skin);
// Add to HUD Stage
hudStage.addActor(touchpad);
hudStage.addActor(progressBar);
// Add to Game Stage
stage.addActor(player);
I saw there is a event/listener system on actor but I don’t see how to propagate event through actors in differents stage. Could you help me ?