use of games.rednblack.editor.proxy.SceneDataManager in project HyperLap2D by rednblackgames.
the class TalosVFXAsset method deleteAllItemsWithParticleName.
private void deleteAllItemsWithParticleName(String name) {
for (CompositeItemVO compositeItemVO : projectManager.getCurrentProjectInfoVO().libraryItems.values()) {
deleteAllParticles(compositeItemVO, name);
}
for (SceneVO scene : projectManager.currentProjectInfoVO.scenes) {
SceneVO loadedScene = resourceManager.getSceneVO(scene.sceneName);
CompositeItemVO tmpVo = new CompositeItemVO(loadedScene.composite);
deleteAllParticles(tmpVo, name);
loadedScene.composite = tmpVo;
SceneDataManager sceneDataManager = facade.retrieveProxy(SceneDataManager.NAME);
sceneDataManager.saveScene(loadedScene);
}
}
use of games.rednblack.editor.proxy.SceneDataManager in project HyperLap2D by rednblackgames.
the class ParticleEffectAsset method deleteAllItemsWithParticleName.
private void deleteAllItemsWithParticleName(String name) {
for (CompositeItemVO compositeItemVO : projectManager.getCurrentProjectInfoVO().libraryItems.values()) {
deleteAllParticles(compositeItemVO, name);
}
for (SceneVO scene : projectManager.currentProjectInfoVO.scenes) {
SceneVO loadedScene = resourceManager.getSceneVO(scene.sceneName);
CompositeItemVO tmpVo = new CompositeItemVO(loadedScene.composite);
deleteAllParticles(tmpVo, name);
loadedScene.composite = tmpVo;
SceneDataManager sceneDataManager = facade.retrieveProxy(SceneDataManager.NAME);
sceneDataManager.saveScene(loadedScene);
}
}
use of games.rednblack.editor.proxy.SceneDataManager in project HyperLap2D by rednblackgames.
the class SpineAsset method deleteAllItemsSpineAnimations.
private void deleteAllItemsSpineAnimations(String spineAnimationName) {
for (CompositeItemVO compositeItemVO : projectManager.getCurrentProjectInfoVO().libraryItems.values()) {
deleteAllSpineAnimationsOfItem(compositeItemVO, spineAnimationName);
}
for (SceneVO scene : projectManager.currentProjectInfoVO.scenes) {
SceneVO loadedScene = resourceManager.getSceneVO(scene.sceneName);
CompositeItemVO tmpVo = new CompositeItemVO(loadedScene.composite);
deleteAllSpineAnimationsOfItem(tmpVo, spineAnimationName);
loadedScene.composite = tmpVo;
SceneDataManager sceneDataManager = facade.retrieveProxy(SceneDataManager.NAME);
sceneDataManager.saveScene(loadedScene);
}
}
use of games.rednblack.editor.proxy.SceneDataManager in project HyperLap2D by rednblackgames.
the class SpriteAnimationAtlasAsset method deleteAllItemsSpriteAnimations.
private void deleteAllItemsSpriteAnimations(String spriteAnimationName) {
for (CompositeItemVO compositeItemVO : projectManager.getCurrentProjectInfoVO().libraryItems.values()) {
deleteAllSpriteAnimationsOfItem(compositeItemVO, spriteAnimationName);
}
for (SceneVO scene : projectManager.currentProjectInfoVO.scenes) {
SceneVO loadedScene = resourceManager.getSceneVO(scene.sceneName);
CompositeItemVO tmpVo = new CompositeItemVO(loadedScene.composite);
deleteAllSpriteAnimationsOfItem(tmpVo, spriteAnimationName);
loadedScene.composite = tmpVo;
SceneDataManager sceneDataManager = facade.retrieveProxy(SceneDataManager.NAME);
sceneDataManager.saveScene(loadedScene);
}
}
use of games.rednblack.editor.proxy.SceneDataManager in project HyperLap2D by rednblackgames.
the class UISceneBoxMediator method handleNotification.
@Override
public void handleNotification(INotification notification) {
super.handleNotification(notification);
Sandbox sandbox = Sandbox.getInstance();
switch(notification.getName()) {
case ProjectManager.PROJECT_OPENED:
case MsgAPI.SCENE_LOADED:
viewComponent.update();
break;
case UISceneBox.CHANGE_SCENE_BTN_CLICKED:
facade.sendNotification(MsgAPI.CHECK_EDITS_ACTION, (Runnable) () -> sandbox.loadScene(notification.getBody()));
break;
case UISceneBox.CREATE_NEW_SCENE_BTN_CLICKED:
Dialogs.showInputDialog(sandbox.getUIStage(), "Create New Scene", "Scene Name : ", false, new StringNameValidator(), new InputDialogListener() {
@Override
public void finished(String input) {
if (input == null || input.equals("")) {
viewComponent.setCurrentScene();
return;
}
SceneDataManager sceneDataManager = facade.retrieveProxy(SceneDataManager.NAME);
sceneDataManager.createNewScene(input);
facade.sendNotification(MsgAPI.CHECK_EDITS_ACTION, (Runnable) () -> sandbox.loadScene(input));
}
@Override
public void canceled() {
viewComponent.setCurrentScene();
}
});
break;
case UISceneBox.DELETE_CURRENT_SCENE_BTN_CLICKED:
Dialogs.showConfirmDialog(sandbox.getUIStage(), "Delete Scene", "Do you really want to delete '" + notification.getBody() + "' scene?", new String[] { "Cancel", "Delete" }, new Integer[] { 0, 1 }, result -> {
if (result == 1) {
SceneDataManager sceneDataManager = facade.retrieveProxy(SceneDataManager.NAME);
sceneDataManager.deleteCurrentScene();
sandbox.loadScene("MainScene");
}
}).padBottom(20).pack();
break;
default:
break;
}
}
Aggregations