diff --git a/Assets/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPluginDependencies.xml b/Assets/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPluginDependencies.xml index f679dd1..d1c85ed 100644 --- a/Assets/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPluginDependencies.xml +++ b/Assets/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPluginDependencies.xml @@ -1,6 +1,6 @@ - + - @@ -10,4 +10,4 @@ - \ No newline at end of file + diff --git a/Assets/GooglePlayGames/com.google.play.games/Runtime/Scripts/GameInfo.cs b/Assets/GooglePlayGames/com.google.play.games/Runtime/Scripts/GameInfo.cs index 4fae737..d6a65d6 100644 --- a/Assets/GooglePlayGames/com.google.play.games/Runtime/Scripts/GameInfo.cs +++ b/Assets/GooglePlayGames/com.google.play.games/Runtime/Scripts/GameInfo.cs @@ -13,9 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. // -#if UNITY_ANDROID -namespace GooglePlayGames { +#if UNITY_ANDROID +namespace GooglePlayGames +{ /// /// This file is automatically generated DO NOT EDIT! /// @@ -29,33 +30,32 @@ namespace GooglePlayGames { /// by checking whether it still retains its initial value - we prevent the constants from being /// replaced in the aforementioned search/replace by stripping off the leading and trailing "__". /// - public static class GameInfo { - + public static class GameInfo + { private const string UnescapedApplicationId = "APP_ID"; - private const string UnescapedIosClientId = "IOS_CLIENTID"; private const string UnescapedWebClientId = "WEB_CLIENTID"; private const string UnescapedNearbyServiceId = "NEARBY_SERVICE_ID"; - public const string ApplicationId = "542756239918"; // Filled in automatically - public const string IosClientId = "__IOS_CLIENTID__"; // Filled in automatically - public const string WebClientId = ""; // Filled in automatically - public const string NearbyConnectionServiceId = "com.MoxiFoxi.PlaneRun"; + public const string ApplicationId = "__APP_ID__"; // Filled in automatically + public const string WebClientId = "__WEB_CLIENTID__"; // Filled in automatically + public const string NearbyConnectionServiceId = "__NEARBY_SERVICE_ID__"; - public static bool ApplicationIdInitialized() { - return !string.IsNullOrEmpty(ApplicationId) && !ApplicationId.Equals(ToEscapedToken(UnescapedApplicationId)); + + public static bool ApplicationIdInitialized() + { + return !string.IsNullOrEmpty(ApplicationId) && + !ApplicationId.Equals(ToEscapedToken(UnescapedApplicationId)); } - public static bool IosClientIdInitialized() { - return !string.IsNullOrEmpty(IosClientId) && !IosClientId.Equals(ToEscapedToken(UnescapedIosClientId)); - } - - public static bool WebClientIdInitialized() { + public static bool WebClientIdInitialized() + { return !string.IsNullOrEmpty(WebClientId) && !WebClientId.Equals(ToEscapedToken(UnescapedWebClientId)); } - public static bool NearbyConnectionsInitialized() { + public static bool NearbyConnectionsInitialized() + { return !string.IsNullOrEmpty(NearbyConnectionServiceId) && - !NearbyConnectionServiceId.Equals(ToEscapedToken(UnescapedNearbyServiceId)); + !NearbyConnectionServiceId.Equals(ToEscapedToken(UnescapedNearbyServiceId)); } /// @@ -63,9 +63,10 @@ namespace GooglePlayGames { /// /// The escaped token. /// The Token - private static string ToEscapedToken(string token) { + private static string ToEscapedToken(string token) + { return string.Format("__{0}__", token); } } } -#endif +#endif //UNITY_ANDROID \ No newline at end of file diff --git a/Assets/Scripts/PickupManager.cs b/Assets/Scripts/PickupManager.cs index 9e9d7da..11cb622 100644 --- a/Assets/Scripts/PickupManager.cs +++ b/Assets/Scripts/PickupManager.cs @@ -99,6 +99,7 @@ public class PickupManager : MonoBehaviour public void ActivateMissle() { misslePickup.EnableMissle(); + } public void ShootMissle(Transform target) @@ -344,5 +345,6 @@ public class MisslePickup { missleButton.SetActive(false); pickupManager.EnableMissle(); + pickupManager.currentPickup = 0; } } \ No newline at end of file diff --git a/Assets/Scripts/PlayGamesManager_old.cs b/Assets/Scripts/PlayGamesManager_old.cs deleted file mode 100644 index d70ff18..0000000 --- a/Assets/Scripts/PlayGamesManager_old.cs +++ /dev/null @@ -1,135 +0,0 @@ -using UnityEngine; -using GooglePlayGames; -using GooglePlayGames.BasicApi; -using GooglePlayGames.BasicApi.SavedGame; -using System; -using TMPro; - - -public class PlayGamesManager_old : MonoBehaviour -{ - [SerializeField] - TMP_Text nicknameText; - - private score score; - - [SerializeField] - private shopManager shopManager; - - // Start is called before the first frame update - void Start() - { - this.score = GetComponent(); - - SignIn(); - - } - - public void SignIn() - { - PlayGamesPlatform.Activate(); - PlayGamesPlatform.Instance.Authenticate(ProcessAuthentication); - - OpenSave(false); - } - - internal void ProcessAuthentication(SignInStatus status) - { - if (status == SignInStatus.Success) - { - // Continue with Play Games Services - - string name = PlayGamesPlatform.Instance.GetUserDisplayName(); - - nicknameText.text = name; - } - else - { - // Disable your integration with Play Games Services or show a login button - // to ask users to sign-in. Clicking it should call - // PlayGamesPlatform.Instance.ManuallyAuthenticate(ProcessAuthentication). - } - } - - #region SavedGames - - private bool isSaving; - - public void OpenSave(bool saving) - { - if(Social.localUser.authenticated) - { - isSaving = saving; - ((PlayGamesPlatform)Social.Active).SavedGame.OpenWithAutomaticConflictResolution("Save", DataSource.ReadCacheOrNetwork, ConflictResolutionStrategy.UseLongestPlaytime, SavedGameOpen); - } - } - - private void SavedGameOpen(SavedGameRequestStatus status, ISavedGameMetadata metadata) - { - if(status == SavedGameRequestStatus.Success) - { - if(isSaving) // Saving - { - byte[] myData = System.Text.ASCIIEncoding.ASCII.GetBytes(GetSaveString()); - - SavedGameMetadataUpdate updateForMetadata = new SavedGameMetadataUpdate.Builder().WithUpdatedDescription("I have played my game at: " + DateTime.Now.ToString()).Build(); - - ((PlayGamesPlatform)Social.Active).SavedGame.CommitUpdate(metadata, updateForMetadata, myData, SaveCallback); - } - else // Loading - { - ((PlayGamesPlatform)Social.Active).SavedGame.ReadBinaryData(metadata, LoadCallBack); - } - } - } - - private void LoadCallBack(SavedGameRequestStatus status, byte[] data) - { - if(status == SavedGameRequestStatus.Success) - { - string loadedData = System.Text.ASCIIEncoding.ASCII.GetString(data); - - LoadSavedString(loadedData); - } - } - - private void LoadSavedString(string loadedData) - { - string[] cloudStringArr = loadedData.Split('|'); - - int highscore = int.Parse(cloudStringArr[0]); - - int coins = int.Parse(cloudStringArr[1]); - - string ownedPlanes = cloudStringArr[2]; - - score.SetHighscore(highscore); - - shopManager.coins = coins; - - shopManager.ConvertOwnedPlanes(ownedPlanes); - } - - private string GetSaveString() - { - string dataToSave = ""; - - dataToSave += ((int)score.highscoreAmount).ToString() + "|" + shopManager.coins.ToString() + "|" + shopManager.GetOwnedPlanesString(); - - return dataToSave; - } - - private void SaveCallback(SavedGameRequestStatus status, ISavedGameMetadata metadata) - { - if(status == SavedGameRequestStatus.Success) - { - Debug.Log("Successfully saved to the cloud"); - } - else - { - Debug.Log("Failed to save to cloud"); - } - } - - #endregion -} \ No newline at end of file diff --git a/Assets/Scripts/PlayGamesManager_old.cs.meta b/Assets/Scripts/PlayGamesManager_old.cs.meta deleted file mode 100644 index 8f2914f..0000000 --- a/Assets/Scripts/PlayGamesManager_old.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: dce2ad60d23539e44a8422890ae506cc -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 87fd337..c06a019 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -171,9 +171,9 @@ PlayerSettings: iPhone: 0 tvOS: 0 overrideDefaultApplicationIdentifier: 0 - AndroidBundleVersionCode: 8 + AndroidBundleVersionCode: 28 AndroidMinSdkVersion: 30 - AndroidTargetSdkVersion: 33 + AndroidTargetSdkVersion: 34 AndroidPreferredInstallLocation: 1 aotOptions: stripEngineCode: 1 diff --git a/Readme.md b/Readme.md index e69de29..c383a2f 100644 --- a/Readme.md +++ b/Readme.md @@ -0,0 +1,12 @@ +# Plane Run + +## v0.1 - 0.3.23 + +A lot... + +## v0.3.24 + +### Bug fixes + +- All missles now should detect flares +- After activating missle pickup you can pickup other pickups \ No newline at end of file