@Override protected void layout() { clear(); SparseArray<Image> newIcons = new SparseArray<Image>(); for (Buff buff : ch.buffs()) { int icon = buff.icon(); if (icon != NONE) { Image img = new Image(texture); img.frame(film.get(icon)); img.x = x + members.size() * (SIZE + 2); img.y = y; add(img); newIcons.put(icon, img); } } for (Integer key : icons.keyArray()) { if (newIcons.get(key) == null) { Image icon = icons.get(key); icon.origin.set(SIZE / 2); add(icon); add( new AlphaTweener(icon, 0, 0.6f) { @Override protected void updateValues(float progress) { super.updateValues(progress); image.scale.set(1 + 5 * progress); }; }); } } icons = newIcons; }
public static void showChapter(int id) { if (Dungeon.chapters.contains(id)) { return; } String text = CHAPTERS.get(id); if (text != null) { WndStory wnd = new WndStory(text); if ((wnd.delay = 0.6f) > 0) { wnd.shadow.visible = wnd.chrome.visible = wnd.tf.visible = false; } Game.scene().add(wnd); Dungeon.chapters.add(id); } }
public static Actor findById(int id) { return ids.get(id); }