public static motion.TextSprite addTextSpriteWithRelativeSize(motion.Scene scene, motion.SpriteLayer layer, string text, double size) { var tp = motion.TextProperties.forText(text); tp.setFontSizeRelative(size); return(layer.addTextSprite(tp)); }
public void pushScene(motion.Scene scene) { if (manager != null) { manager.pushScene(scene); } }
public void replaceScene(motion.Scene scene) { if (manager != null) { manager.replaceScene(scene); } }
public static motion.SceneManager forScene(motion.Scene scene, motion.Backend backend) { var v = new motion.SceneManager(); v.setBackend(backend); v.pushScene(scene); return(v); }
public static motion.TextureSprite addColorSprite(motion.Scene scene, motion.SpriteLayer layer, cave.Color color, double width, double height) { var text = scene.createTextureForColor(color); if (text == null) { return(null); } return(layer.addTextureSpriteForSize(text, width, height)); }
public void pushScene(motion.Scene scene) { var currentScene = sceneStack.peek(); if (currentScene != null) { if (isStarted) { currentScene.stop(); } if (isInitialized) { currentScene.cleanup(); } } if (scene != null) { scene.setContext(context); scene.setBackend(backend); scene.setManager(this); sceneStack.push((motion.Scene)scene); onNewCurrentScene(); } }
private void doReplaceCurrentScene(motion.Scene next) { popScene(); pushScene(next); }
public void replaceScene(motion.Scene next) { doReplaceCurrentScene(next); }
public static motion.TextSprite addTextSprite(motion.Scene scene, motion.SpriteLayer layer, string text) { return(layer.addTextSprite(motion.TextProperties.forText(text))); }
public static motion.TextureSprite addTextureSpriteForSize(motion.Scene scene, motion.SpriteLayer layer, motion.Texture texture, double width, double height) { return(layer.addTextureSpriteForSize(texture, width, height)); }
public static motion.TextureSprite addTextureSpriteForWidth(motion.Scene scene, motion.SpriteLayer layer, motion.Texture texture, double width) { return(layer.addTextureSpriteForSize(texture, width, 0.00)); }
public static motion.TextureSprite addColorSprite(motion.Scene scene, motion.SpriteLayer layer, cave.Color color, double width) { return(motion.SpriteUtil.addColorSprite(scene, layer, color, width, 0.00)); }