예제 #1
0
        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));
        }
예제 #2
0
 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);
         }
     }
 }
예제 #3
0
 public static motion.TextureSprite addTextureSpriteForSize(motion.Scene scene, motion.SpriteLayer layer, motion.Texture texture, double width, double height)
 {
     return(layer.addTextureSpriteForSize(texture, width, height));
 }
예제 #4
0
 public static motion.TextureSprite addTextureSpriteForWidth(motion.Scene scene, motion.SpriteLayer layer, motion.Texture texture, double width)
 {
     return(layer.addTextureSpriteForSize(texture, width, 0.00));
 }