use of com.talosvfx.talos.editor.ParticleEmitterWrapper in project talos by rockbite.
the class EmitterList method createNewEmitterClicked.
private void createNewEmitterClicked() {
ParticleEmitterWrapper selectedItem = getSelectedItem();
float sortPosition = 0;
// if nothing is selected we are adding on top
if (selectedItem != null) {
sortPosition = selectedItem.getEmitter().getSortPosition() + 0.5f;
}
final ParticleEmitterWrapper emitter = TalosMain.Instance().TalosProject().createNewEmitter("emitter", sortPosition);
Array<ParticleEmitterWrapper> activeWrappers = TalosMain.Instance().TalosProject().getActiveWrappers();
// update all items
// activeWrappers.reverse();
setData(activeWrappers);
setSelected(emitter);
}
Aggregations