当前位置: 首页>>代码示例>>C#>>正文


C# Asset.IsState方法代码示例

本文整理汇总了C#中UnityEditor.VersionControl.Asset.IsState方法的典型用法代码示例。如果您正苦于以下问题:C# Asset.IsState方法的具体用法?C# Asset.IsState怎么用?C# Asset.IsState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UnityEditor.VersionControl.Asset的用法示例。


在下文中一共展示了Asset.IsState方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DrawOverlays

 private static void DrawOverlays(Asset asset, Asset metaAsset, Rect itemRect)
 {
     CreateStaticResources();
     float width = 16f;
     float num2 = 1f;
     float num3 = 4f;
     float num4 = -4f;
     Rect iconRect = new Rect(itemRect.x - num2, itemRect.y - num3, width, width);
     Rect rect2 = new Rect((itemRect.xMax - width) + num2, itemRect.y - num3, width, width);
     Rect rect3 = new Rect(itemRect.x - num2, (itemRect.yMax - width) + num3, width, width);
     Rect rect4 = new Rect((itemRect.xMax - width) + num4, (itemRect.yMax - width) + num3, width, width);
     Asset.States states = Asset.States.MetaFile | Asset.States.ReadOnly | Asset.States.Synced | Asset.States.Local;
     bool flag = (metaAsset == null) || ((metaAsset.state & states) == states);
     Asset.States states2 = (metaAsset != null) ? (metaAsset.state & (Asset.States.LockedLocal | Asset.States.AddedLocal | Asset.States.DeletedLocal | Asset.States.CheckedOutLocal)) : Asset.States.None;
     Asset.States states3 = (metaAsset != null) ? (metaAsset.state & (Asset.States.LockedRemote | Asset.States.AddedRemote | Asset.States.DeletedRemote | Asset.States.CheckedOutRemote)) : Asset.States.None;
     bool flag2 = asset.isFolder && Provider.isVersioningFolders;
     if (asset.IsState(Asset.States.AddedLocal))
     {
         DrawOverlay(Asset.States.AddedLocal, iconRect);
         if (((metaAsset != null) && ((states2 & Asset.States.AddedLocal) == Asset.States.None)) && !flag)
         {
             DrawMetaOverlay(iconRect, false);
         }
     }
     else if (asset.IsState(Asset.States.DeletedLocal))
     {
         DrawOverlay(Asset.States.DeletedLocal, iconRect);
         if (((metaAsset != null) && ((states2 & Asset.States.DeletedLocal) == Asset.States.None)) && metaAsset.IsState(Asset.States.Missing | Asset.States.Local))
         {
             DrawMetaOverlay(iconRect, false);
         }
     }
     else if (asset.IsState(Asset.States.LockedLocal))
     {
         DrawOverlay(Asset.States.LockedLocal, iconRect);
         if (((metaAsset != null) && ((states2 & Asset.States.LockedLocal) == Asset.States.None)) && !flag)
         {
             DrawMetaOverlay(iconRect, false);
         }
     }
     else if (asset.IsState(Asset.States.CheckedOutLocal))
     {
         DrawOverlay(Asset.States.CheckedOutLocal, iconRect);
         if (((metaAsset != null) && ((states2 & Asset.States.CheckedOutLocal) == Asset.States.None)) && !flag)
         {
             DrawMetaOverlay(iconRect, false);
         }
     }
     else if ((asset.IsState(Asset.States.Local) && !asset.IsState(Asset.States.OutOfSync)) && !asset.IsState(Asset.States.Synced))
     {
         DrawOverlay(Asset.States.Local, rect3);
         if ((metaAsset != null) && (metaAsset.IsUnderVersionControl || !metaAsset.IsState(Asset.States.Local)))
         {
             DrawMetaOverlay(rect3, false);
         }
     }
     else if ((metaAsset != null) && metaAsset.IsState(Asset.States.AddedLocal))
     {
         DrawOverlay(Asset.States.AddedLocal, iconRect);
         if (flag2)
         {
             DrawMetaOverlay(iconRect, false);
         }
     }
     else if ((metaAsset != null) && metaAsset.IsState(Asset.States.DeletedLocal))
     {
         DrawOverlay(Asset.States.DeletedLocal, iconRect);
         if (flag2)
         {
             DrawMetaOverlay(iconRect, false);
         }
     }
     else if ((metaAsset != null) && metaAsset.IsState(Asset.States.LockedLocal))
     {
         DrawOverlay(Asset.States.LockedLocal, iconRect);
         if (flag2)
         {
             DrawMetaOverlay(iconRect, false);
         }
     }
     else if ((metaAsset != null) && metaAsset.IsState(Asset.States.CheckedOutLocal))
     {
         DrawOverlay(Asset.States.CheckedOutLocal, iconRect);
         if (flag2)
         {
             DrawMetaOverlay(iconRect, false);
         }
     }
     else if ((((metaAsset != null) && metaAsset.IsState(Asset.States.Local)) && (!metaAsset.IsState(Asset.States.OutOfSync) && !metaAsset.IsState(Asset.States.Synced))) && (!asset.IsState(Asset.States.Conflicted) && ((metaAsset == null) || !metaAsset.IsState(Asset.States.Conflicted))))
     {
         DrawOverlay(Asset.States.Local, rect3);
         if (flag2)
         {
             DrawMetaOverlay(rect3, false);
         }
     }
     if (asset.IsState(Asset.States.Conflicted) || ((metaAsset != null) && metaAsset.IsState(Asset.States.Conflicted)))
     {
         DrawOverlay(Asset.States.Conflicted, rect3);
     }
//.........这里部分代码省略.........
开发者ID:demelev,项目名称:projectHL,代码行数:101,代码来源:Overlay.cs

示例2: DrawOverlays

 private static void DrawOverlays(Asset asset, Asset metaAsset, Rect itemRect)
 {
   Overlay.CreateStaticResources();
   float num1 = 16f;
   float num2 = 1f;
   float num3 = 4f;
   float num4 = -4f;
   Rect iconRect1 = new Rect(itemRect.x - num2, itemRect.y - num3, num1, num1);
   Rect iconRect2 = new Rect(itemRect.xMax - num1 + num2, itemRect.y - num3, num1, num1);
   Rect iconRect3 = new Rect(itemRect.x - num2, itemRect.yMax - num1 + num3, num1, num1);
   Rect iconRect4 = new Rect(itemRect.xMax - num1 + num4, itemRect.yMax - num1 + num3, num1, num1);
   Asset.States states1 = Asset.States.Local | Asset.States.Synced | Asset.States.ReadOnly | Asset.States.MetaFile;
   bool flag1 = metaAsset == null || (metaAsset.state & states1) == states1;
   Asset.States states2 = metaAsset != null ? metaAsset.state & (Asset.States.CheckedOutLocal | Asset.States.DeletedLocal | Asset.States.AddedLocal | Asset.States.LockedLocal) : Asset.States.None;
   Asset.States states3 = metaAsset != null ? metaAsset.state & (Asset.States.CheckedOutRemote | Asset.States.DeletedRemote | Asset.States.AddedRemote | Asset.States.LockedRemote) : Asset.States.None;
   bool flag2 = asset.isFolder && Provider.isVersioningFolders;
   if (asset.IsState(Asset.States.AddedLocal))
   {
     Overlay.DrawOverlay(Asset.States.AddedLocal, iconRect1);
     if (metaAsset != null && (states2 & Asset.States.AddedLocal) == Asset.States.None && !flag1)
       Overlay.DrawMetaOverlay(iconRect1, false);
   }
   else if (asset.IsState(Asset.States.DeletedLocal))
   {
     Overlay.DrawOverlay(Asset.States.DeletedLocal, iconRect1);
     if (metaAsset != null && (states2 & Asset.States.DeletedLocal) == Asset.States.None && metaAsset.IsState(Asset.States.Local | Asset.States.Missing))
       Overlay.DrawMetaOverlay(iconRect1, false);
   }
   else if (asset.IsState(Asset.States.LockedLocal))
   {
     Overlay.DrawOverlay(Asset.States.LockedLocal, iconRect1);
     if (metaAsset != null && (states2 & Asset.States.LockedLocal) == Asset.States.None && !flag1)
       Overlay.DrawMetaOverlay(iconRect1, false);
   }
   else if (asset.IsState(Asset.States.CheckedOutLocal))
   {
     Overlay.DrawOverlay(Asset.States.CheckedOutLocal, iconRect1);
     if (metaAsset != null && (states2 & Asset.States.CheckedOutLocal) == Asset.States.None && !flag1)
       Overlay.DrawMetaOverlay(iconRect1, false);
   }
   else if (asset.IsState(Asset.States.Local) && !asset.IsState(Asset.States.OutOfSync) && !asset.IsState(Asset.States.Synced))
   {
     Overlay.DrawOverlay(Asset.States.Local, iconRect3);
     if (metaAsset != null && (metaAsset.IsUnderVersionControl || !metaAsset.IsState(Asset.States.Local)))
       Overlay.DrawMetaOverlay(iconRect3, false);
   }
   else if (metaAsset != null && metaAsset.IsState(Asset.States.AddedLocal))
   {
     Overlay.DrawOverlay(Asset.States.AddedLocal, iconRect1);
     if (flag2)
       Overlay.DrawMetaOverlay(iconRect1, false);
   }
   else if (metaAsset != null && metaAsset.IsState(Asset.States.DeletedLocal))
   {
     Overlay.DrawOverlay(Asset.States.DeletedLocal, iconRect1);
     if (flag2)
       Overlay.DrawMetaOverlay(iconRect1, false);
   }
   else if (metaAsset != null && metaAsset.IsState(Asset.States.LockedLocal))
   {
     Overlay.DrawOverlay(Asset.States.LockedLocal, iconRect1);
     if (flag2)
       Overlay.DrawMetaOverlay(iconRect1, false);
   }
   else if (metaAsset != null && metaAsset.IsState(Asset.States.CheckedOutLocal))
   {
     Overlay.DrawOverlay(Asset.States.CheckedOutLocal, iconRect1);
     if (flag2)
       Overlay.DrawMetaOverlay(iconRect1, false);
   }
   else if (metaAsset != null && metaAsset.IsState(Asset.States.Local) && (!metaAsset.IsState(Asset.States.OutOfSync) && !metaAsset.IsState(Asset.States.Synced)) && (!asset.IsState(Asset.States.Conflicted) && (metaAsset == null || !metaAsset.IsState(Asset.States.Conflicted))))
   {
     Overlay.DrawOverlay(Asset.States.Local, iconRect3);
     if (flag2)
       Overlay.DrawMetaOverlay(iconRect3, false);
   }
   if (asset.IsState(Asset.States.Conflicted) || metaAsset != null && metaAsset.IsState(Asset.States.Conflicted))
     Overlay.DrawOverlay(Asset.States.Conflicted, iconRect3);
   if (asset.IsState(Asset.States.AddedRemote))
   {
     Overlay.DrawOverlay(Asset.States.AddedRemote, iconRect2);
     if (metaAsset != null && (states3 & Asset.States.AddedRemote) == Asset.States.None)
       Overlay.DrawMetaOverlay(iconRect2, true);
   }
   else if (asset.IsState(Asset.States.DeletedRemote))
   {
     Overlay.DrawOverlay(Asset.States.DeletedRemote, iconRect2);
     if (metaAsset != null && (states3 & Asset.States.DeletedRemote) == Asset.States.None)
       Overlay.DrawMetaOverlay(iconRect2, true);
   }
   else if (asset.IsState(Asset.States.LockedRemote))
   {
     Overlay.DrawOverlay(Asset.States.LockedRemote, iconRect2);
     if (metaAsset != null && (states3 & Asset.States.LockedRemote) == Asset.States.None)
       Overlay.DrawMetaOverlay(iconRect2, true);
   }
   else if (asset.IsState(Asset.States.CheckedOutRemote))
   {
     Overlay.DrawOverlay(Asset.States.CheckedOutRemote, iconRect2);
     if (metaAsset != null && (states3 & Asset.States.CheckedOutRemote) == Asset.States.None)
//.........这里部分代码省略.........
开发者ID:BlakeTriana,项目名称:unity-decompiled,代码行数:101,代码来源:Overlay.cs


注:本文中的UnityEditor.VersionControl.Asset.IsState方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。