Skip to content

Commit

Permalink
Release version 1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmfinol committed Oct 3, 2018
1 parent 1c87135 commit 89719f4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
3 changes: 1 addition & 2 deletions Assets/Scripts/CGS/Menus/DeckLoadMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public class DeckLoadMenu : SelectionPanel

public const string DeletePrompt = "Are you sure you would like to delete this deck?";
public const string DeckDeleteErrorMessage = "There was an error while attempting to delete the deck: ";
public const string ShareMessage = "Deck text copied to clipboard";
public const string DeckLoadErrorMessage = "There was an error while loading the deck: ";
public const string DeckSaveErrorMessage = "There was an error saving the deck to file: ";

Expand Down Expand Up @@ -197,7 +196,7 @@ public void Share()
(new NativeShare()).SetText(shareText).Share();
#else
UniClipboard.SetText(shareText);
CardGameManager.Instance.Messenger.Show(ShareMessage);
CardGameManager.Instance.Messenger.Show(DeckSaveMenu.DeckCopiedMessage);
#endif
}

Expand Down
15 changes: 7 additions & 8 deletions Assets/Scripts/CGS/Menus/GameSelectionMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class GameSelectionMenu : SelectionPanel
public const string ShareTitle = "Card Game Simulator - {0}";
public const string ShareDescription = "Play {0} on CGS!";
public const string ShareMessage = "Get CGS for {0}: {1}";
public const string ShareMessage2 = "Share link copied to clipboard: {0}";
public const string ShareMessage2 = "Share functionality only available on Android/iOS.";
public const string DominoesUrl = "https://cardgamesim.finoldigital.com/games/Dominoes/Dominoes.json";
public const string StandardUrl = "https://cardgamesim.finoldigital.com/games/Standard/Standard.json";
public const string MahjongUrl = "https://cardgamesim.finoldigital.com/games/Mahjong/Mahjong.json";
Expand Down Expand Up @@ -111,7 +111,11 @@ public void Share()
BranchLinkProperties linkProperties = new BranchLinkProperties();
linkProperties.controlParams.Add(TitleScreen.GameName, CardGameManager.Current.Name);
linkProperties.controlParams.Add(TitleScreen.GameUrl, CardGameManager.Current.AutoUpdateUrl);
#if (UNITY_ANDROID || UNITY_IOS) && !UNITY_EDITOR
Branch.getShortURL(universalObject, linkProperties, BranchCallbackWithUrl);
#else
CardGameManager.Instance.Messenger.Show(string.Format(ShareMessage2));
#endif
}

public void BranchCallbackWithUrl(string url, string error)
Expand All @@ -122,13 +126,8 @@ public void BranchCallbackWithUrl(string url, string error)
return;
}

string shareText = string.Format(ShareMessage, CardGameManager.Current.Name, url);
#if (UNITY_ANDROID || UNITY_IOS) && !UNITY_EDITOR
(new NativeShare()).SetText(shareText).Share();
#else
UniClipboard.SetText(url);
CardGameManager.Instance.Messenger.Show(string.Format(ShareMessage2, url));
#endif
NativeShare nativeShare = new NativeShare();
nativeShare.SetText(string.Format(ShareMessage, CardGameManager.Current.Name, url)).Share();
}

public void ShowDownloadPanel()
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/CGS/Menus/TitleScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class TitleScreen : MonoBehaviour
void Start()
{
versionText.text = MainMenu.VersionMessage + Application.version;
#if UNITY_ANDROID || UNITY_IOS
#if (UNITY_ANDROID || UNITY_IOS) && !UNITY_EDITOR
Branch.initSession(BranchCallbackWithBranchUniversalObject);
#endif
}
Expand Down
1 change: 1 addition & 0 deletions ProjectSettings/GraphicsSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ GraphicsSettings:
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16002, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}
Expand Down

0 comments on commit 89719f4

Please sign in to comment.