Skip to content

Commit

Permalink
Release version 1.20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmfinol committed Oct 3, 2019
1 parent 68c1a88 commit eeadb77
Show file tree
Hide file tree
Showing 87 changed files with 524 additions and 288 deletions.
7 changes: 7 additions & 0 deletions Assets/Scripts/CGS/CardGameManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,13 @@ private void CreateDefaultCardGames()
{
#if UNITY_ANDROID && !UNITY_EDITOR
UnityExtensionMethods.ExtractAndroidStreamingAssets(CardGame.GamesDirectoryPath);
#elif UNITY_WEBGL
if (!Directory.Exists(CardGame.GamesDirectoryPath))
Directory.CreateDirectory(CardGame.GamesDirectoryPath);
string standardPlayingCardsDirectory = CardGame.GamesDirectoryPath + "/" + Tags.StandardPlayingCardsDirectoryName;
if (!Directory.Exists(standardPlayingCardsDirectory))
Directory.CreateDirectory(standardPlayingCardsDirectory);
File.WriteAllText(standardPlayingCardsDirectory + "/" + Tags.StandardPlayingCardsJsonFileName, Tags.StandPlayingCardsJsonFileContent);
#else
UnityExtensionMethods.CopyDirectory(Application.streamingAssetsPath, CardGame.GamesDirectoryPath);
#endif
Expand Down
4 changes: 4 additions & 0 deletions Assets/Scripts/CGS/Tags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ public static class Tags
{
public const string CardGameManager = "CardGameManager";
public const string CardViewer = "CardViewer";
public const string StandardPlayingCardsDirectoryName = "Standard Playing Cards@aHR0cHM6Ly93d3cuY2FyZGdhbWVzaW11bGF0b3IuY29tL2dhbWVzL1N0YW5kYXJkL1N0YW5kYXJkLmpzb24=";
public const string StandardPlayingCardsJsonFileName = "Standard Playing Cards.json";
public const string StandPlayingCardsJsonFileContent = "{\"name\":\"Standard Playing Cards\",\"autoUpdateUrl\":\"https://www.cardgamesimulator.com/games/Standard/Standard.json\"}";

}
}
8 changes: 7 additions & 1 deletion Assets/Scripts/CardGameDef/CardGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -438,9 +438,15 @@ public void Load(CardGameCoroutineDelegate updateCoroutine, CardGameCoroutineDel
}

// Don't waste time loading if we need to update first
bool shouldUpdate;
#if UNITY_WEBGL
shouldUpdate = !HasDownloaded;
#else
int daysSinceUpdate = 0;
try { daysSinceUpdate = (int)DateTime.Today.Subtract(File.GetLastWriteTime(GameFilePath).Date).TotalDays; } catch { };
if (AutoUpdate >= 0 && daysSinceUpdate >= AutoUpdate && CoroutineRunner != null)
shouldUpdate = AutoUpdate >= 0 && daysSinceUpdate >= AutoUpdate && CoroutineRunner != null;
#endif
if (shouldUpdate)
{
CoroutineRunner.StartCoroutine(updateCoroutine(this));
return;
Expand Down
8 changes: 8 additions & 0 deletions Assets/Sprites and Textures/UWP.meta

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

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
88 changes: 88 additions & 0 deletions Assets/Sprites and Textures/UWP/SplashScreen.scale-100.png.meta

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

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
88 changes: 88 additions & 0 deletions Assets/Sprites and Textures/UWP/SplashScreen.scale-125.png.meta

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

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
88 changes: 88 additions & 0 deletions Assets/Sprites and Textures/UWP/SplashScreen.scale-150.png.meta

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

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit eeadb77

Please sign in to comment.