Пример #1
0
 public static void SetGenderImageSprite(Image image, byte bGender)
 {
     if (bGender == 1)
     {
         CUIUtility.SetImageSprite(image, string.Format("{0}icon/Ico_boy.prefab", "UGUI/Sprite/Dynamic/"), null, true, false, false, false);
     }
     else if (bGender == 2)
     {
         CUIUtility.SetImageSprite(image, string.Format("{0}icon/Ico_girl.prefab", "UGUI/Sprite/Dynamic/"), null, true, false, false, false);
     }
 }
Пример #2
0
 public static void SetImageSprite(Image image, string prefabPath, CUIFormScript formScript, bool loadSync = true, bool needCached = false, bool unloadBelongedAssetBundleAfterLoaded = false, bool isShowSpecMatrial = false)
 {
     if (image == null)
     {
         return;
     }
     if (loadSync)
     {
         CUIUtility.SetImageSprite(image, CUIUtility.GetSpritePrefeb(prefabPath, needCached, unloadBelongedAssetBundleAfterLoaded), isShowSpecMatrial);
     }
     else
     {
         image.color = new Color(image.color.r, image.color.g, image.color.b, 0f);
         formScript.AddASyncLoadedImage(image, prefabPath, needCached, unloadBelongedAssetBundleAfterLoaded, isShowSpecMatrial);
     }
 }
Пример #3
0
 public static void SetSprite(this Image image, string prefabPath, CUIFormScript formScript, bool loadSync = true, bool needCached = false, bool unloadBelongedAssetBundleAfterLoaded = false)
 {
     CUIUtility.SetImageSprite(image, prefabPath, formScript, loadSync, needCached, unloadBelongedAssetBundleAfterLoaded);
 }
Пример #4
0
 public static void SetSprite(this Image image, Image targetImage)
 {
     CUIUtility.SetImageSprite(image, targetImage);
 }
Пример #5
0
 public static void SetSprite(this Image image, GameObject prefab)
 {
     CUIUtility.SetImageSprite(image, prefab);
 }
Пример #6
0
 public static void SetSprite(this Image image, GameObject prefab, bool isShowSpecMatrial = false)
 {
     CUIUtility.SetImageSprite(image, prefab, isShowSpecMatrial);
 }