public void showNotif(String text) { notifTxt.remove(); notifTxt.setText(text); notifTxt.setPosition(512 - notifTxt.getWidth() / 2, 300 - notifTxt.getHeight() / 2); notifTxt.setAlignment(Align.center); GdxGame.ui_stage1.addActor(notifTxt); notifTxt.clearActions(); notifTxt.addAction(sequence(alpha(1f), delay(1f), fadeOut(1f), removeActor())); }