Esempio n. 1
0
 public void ReplaceAlphaWith(Texture2D newTexture)
 {
     if (newTexture != null)
     {
         ReplaceAlphaWith(D2D_Helper.ExtractAlphaData(newTexture), newTexture.width, newTexture.height);
     }
     else
     {
         DestroyAlphaTex();
     }
 }
Esempio n. 2
0
    public void ReplaceAlphaWith(Sprite newSprite)
    {
        var data   = default(byte[]);
        var width  = default(int);
        var height = default(int);

        if (D2D_Helper.ExtractAlphaData(newSprite, ref data, ref width, ref height) == true)
        {
            ReplaceAlphaWith(data, width, height);
        }
        else
        {
            DestroyAlphaTex();
        }
    }