コード例 #1
0
ファイル: GenWorld.cs プロジェクト: sachdevs/RW-Decompile
 public static int MouseTile(bool snapToExpandableWorldObjects = false)
 {
     if (GenWorld.cachedFrame == Time.frameCount)
     {
         return(GenWorld.cachedTile);
     }
     GenWorld.cachedTile  = GenWorld.TileAt(UI.MousePositionOnUI, snapToExpandableWorldObjects);
     GenWorld.cachedFrame = Time.frameCount;
     return(GenWorld.cachedTile);
 }
コード例 #2
0
ファイル: GenWorld.cs プロジェクト: wensincai/RW-Decompile
 public static int MouseTile(bool snapToExpandableWorldObjects = false)
 {
     if (snapToExpandableWorldObjects)
     {
         if (GenWorld.cachedFrame_snap == Time.frameCount)
         {
             return(GenWorld.cachedTile_snap);
         }
         GenWorld.cachedTile_snap  = GenWorld.TileAt(UI.MousePositionOnUI, true);
         GenWorld.cachedFrame_snap = Time.frameCount;
         return(GenWorld.cachedTile_snap);
     }
     else
     {
         if (GenWorld.cachedFrame_noSnap == Time.frameCount)
         {
             return(GenWorld.cachedTile_noSnap);
         }
         GenWorld.cachedTile_noSnap  = GenWorld.TileAt(UI.MousePositionOnUI, false);
         GenWorld.cachedFrame_noSnap = Time.frameCount;
         return(GenWorld.cachedTile_noSnap);
     }
 }