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)); }
private void updateBackgroundColor() { if (backgroundSprite == null) { if (layer != null) { var txt = getBackgroundTexture(); if (txt != null) { backgroundSprite = layer.addTextureSpriteForSize(txt, layer.getReferenceWidth(), layer.getReferenceHeight()); backgroundSprite.move((double)0, (double)0); } } } else { var txt1 = getBackgroundTexture(); if (txt1 != null) { backgroundSprite.setTexture(txt1); } } }
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)); }