Exemplo n.º 1
0
        public static Sprite GetSprite(string TextureName)
        {
            Sprite    ani;
            Texture2D texture;

            switch (TextureName)
            {
            case @"Solids\SolidBlock.png":
                texture = TextureContent.GetTexture(@"Solids\SolidBlock.png");
                ani     = new Sprite(texture, TextureName);
                ani.SetOriginCenter();
                return(ani);
            }


            return(new Sprite(TextureContent.GetTexture(@"unknown.png"), TextureName));
        }
Exemplo n.º 2
0
        public static Sprite GetSprite(string TextureName)
        {
            Sprite    ani;
            Texture2D texture;

            switch (TextureName)
            {
            case @"kirbytest.png":
                ani = new Sprite(TextureContent.GetTexture(@"kirbytest.png"), TextureName, 23, 23, 8, 54, 10);
                ani.SetAnimationSpeed(10);
                ani.Looping = true;
                ani.Scale   = new Vector2(2, 2);
                ani.SetOriginCenter();
                return(ani);

            case @"Masks\MaskPlayerBase.png":
                texture = TextureContent.GetTexture(@"Masks\MaskPlayerBase.png");
                ani     = new Sprite(texture, TextureName);
                return(ani);
            }


            return(new Sprite(TextureContent.GetTexture(@"unknown.png"), TextureName));
        }