コード例 #1
0
        public void DrawImage(PSImage image, GameObject parent, GameObject ownObj = null)
        {
            switch (image.imageType)
            {
            case ImageType.Image:
                spriteImport.DrawImage(image, parent, parent);
                break;

            case ImageType.Texture:
                textureImport.DrawImage(image, parent, parent);
                break;

            case ImageType.Label:
                textImport.DrawImage(image, parent, parent);
                break;

            case ImageType.SliceImage:
                slicedSpriteImport.DrawImage(image, parent);
                break;

            case ImageType.LeftHalfImage:
                halfSpriteImport.DrawImage(image, parent);
                break;

            case ImageType.UpHalfImage:
                halfSpriteImport.DrawImage(image, parent);
                break;

            default:
                break;
            }
        }
コード例 #2
0
ファイル: PSDImportCtrl.cs プロジェクト: zs9024/FullPSD2UGUI
        public UINode DrawImage(Image image, UINode parent)
        {
            UINode node = null;

            switch (image.imageType)
            {
            case ImageType.Image:
            case ImageType.Texture:
            case ImageType.SliceImage:
                node = spriteImport.DrawImage(image, parent);
                break;

            case ImageType.Label:
                node = textImport.DrawImage(image, parent);
                break;

            default:
                break;
            }
            return(node);
        }