Skip to content

Commit

Permalink
Small edits
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmfinol committed Oct 27, 2024
1 parent 2245c44 commit 4fb2810
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 26 deletions.
10 changes: 0 additions & 10 deletions Assets/Prefabs/CardGameView/Viewer/Playable Viewer.prefab

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions Assets/Prefabs/Menus/Deck Load Menu.prefab

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions Assets/Scripts/Cgs/CardGameManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,18 +192,16 @@ private void Awake()

ResetCurrentToDefault();

#if !UNITY_WEBGL
Debug.Log("CardGameManager::Awake:CheckDeepLinks");
CheckDeepLinks();
#endif
}

// ReSharper disable once MemberCanBeMadeStatic.Local
private void CreateDefaultCardGames()
{
#if UNITY_ANDROID && !UNITY_EDITOR
UnityFileMethods.ExtractAndroidStreamingAssets(UnityCardGame.GamesDirectoryPath);
#elif !UNITY_WEBGL
#else
UnityFileMethods.CopyDirectory(Application.streamingAssetsPath, UnityCardGame.GamesDirectoryPath);
#endif
}
Expand All @@ -212,11 +210,7 @@ internal void LookupCardGames()
{
if (!Directory.Exists(UnityCardGame.GamesDirectoryPath) ||
Directory.GetDirectories(UnityCardGame.GamesDirectoryPath).Length < 1)
#if UNITY_WEBGL
return;
#else
CreateDefaultCardGames();
#endif

foreach (var gameDirectory in Directory.GetDirectories(UnityCardGame.GamesDirectoryPath))
{
Expand Down Expand Up @@ -356,7 +350,6 @@ internal void ResetCurrentToDefault()
: (AllCardGames.FirstOrDefault().Value ?? UnityCardGame.UnityInvalid);
}

#if !UNITY_WEBGL
private void CheckDeepLinks()
{
Application.deepLinkActivated += OnDeepLinkActivated;
Expand Down Expand Up @@ -408,7 +401,6 @@ private static string GetAutoUpdateUrl(string deepLink)

return autoUpdateUrl;
}
#endif

#if UNITY_WEBGL && !UNITY_EDITOR
private IEnumerator Start()
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Cgs/CardGameView/Multiplayer/CardModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class CardModel : CgsNetPlayable, ICardDisplay, ICardDropHandler, IStackD
public const string DropErrorMessage = "Error: Card dropped on Card outside of play area!";
public string DiscardPrompt => $"Delete cannot be undone. Delete {gameObject.name}?";

private const float ZoomHoldTime = 1.5f;
private const float ZoomHoldTime = 0.5f;
private const float MovementSpeed = 600f;

public int Index { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,6 @@ public void Load(CardGameCoroutineDelegate updateCoroutine, CardGameCoroutineDel
}

// Don't waste time loading if we need to update first
#if UNITY_WEBGL
var shouldUpdate = !HasDownloaded;
#else
var daysSinceUpdate = 0;
try
{
Expand All @@ -445,7 +442,6 @@ public void Load(CardGameCoroutineDelegate updateCoroutine, CardGameCoroutineDel
}

var shouldUpdate = AutoUpdate >= 0 && daysSinceUpdate >= AutoUpdate;
#endif
if (shouldUpdate)
{
if (CoroutineRunner != null)
Expand Down

0 comments on commit 4fb2810

Please sign in to comment.