Beispiel #1
0
        public Image GetImage(string filename, Rect <float> source, Action <Image> loadedCB = null)
        {
            Texture2D t2d = game.Content.Load <Texture2D> (filename);
            ImageImpl img = new ImageImpl(t2d, source);

            if (loadedCB != null)
            {
                loadedCB(img);
            }
            return(img);
        }
Beispiel #2
0
        public Image GetImage(string filename, Action <Image> loadedCB = null)
        {
            Texture2D t2d = game.Content.Load <Texture2D> (filename);
            ImageImpl img = new ImageImpl(t2d, new Rect <float>(0, 0, t2d.Width, t2d.Height));

            if (loadedCB != null)
            {
                loadedCB(img);
            }
            return(img);
        }