public void unSubscribeToControllingInteraction(InteractionCallbacks subscriber, Class<? extends InteractionBase> interaction) { for(InteractionBase i: gameControlInteractions) { if(i.getClass() == interaction) { i.unSubscribe(subscriber); return; } } }
public void subscribeToControllingInteraction(InteractionCallbacks subscriber, Class<? extends InteractionBase> interaction) { for(InteractionBase i: gameControlInteractions) { if(i.getClass() == interaction) { i.subscribe(subscriber); // Helper.println("Subscribed to: " + i.getClass().getName()); return; } } }