Skip to content

Commit

Permalink
Merge pull request #44 from VirtueSky/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
VirtueSky authored Dec 18, 2024
2 parents 02ddb16 + f76c060 commit 93dda2c
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
### 1: Download the repo and drop it into folder `Assets`
### 2: Add the line below to `Packages/manifest.json`

for version `3.2.3`
for version `3.2.4`
```csharp
"com.virtuesky.sunflower":"https://github.com/VirtueSky/sunflower.git#3.2.3",
"com.virtuesky.sunflower":"https://github.com/VirtueSky/sunflower.git#3.2.4",
```

## Includes modules
Expand Down
4 changes: 2 additions & 2 deletions VirtueSky/ControlPanel/ConstantPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
public class ConstantPackage
{
public const string VersionSunflower = "3.2.3";
public const string VersionSunflower = "3.2.4";
public const string PackageNameInAppPurchase = "com.unity.purchasing";
public const string MaxVersionInAppPurchase = "4.12.2";
public const string PackageNameNewtonsoftJson = "com.unity.nuget.newtonsoft-json";
Expand Down Expand Up @@ -97,7 +97,7 @@ public class ConstantPackage
public const string PackageNameCoffeeUIEffect = "com.coffee.ui-effect";

public const string MaxVersionCoffeeUIEffect =
"https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.0.0";
"https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.0.1";

public const string PackageNameCoffeeUIParticle = "com.coffee.ui-particle";

Expand Down
7 changes: 5 additions & 2 deletions VirtueSky/Core/Runtime/MonoGlobal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private void OnApplicationFocus(bool hasFocus)
private void OnApplicationPause(bool pauseStatus)
{
OnGamePause?.Invoke(pauseStatus);
if (pauseStatus)
if (pauseStatus && GameData.IsAutoSave)
{
GameData.Save();
}
Expand All @@ -138,7 +138,10 @@ private void OnApplicationPause(bool pauseStatus)
private void OnApplicationQuit()
{
OnGameQuit?.Invoke();
GameData.Save();
if (GameData.IsAutoSave)
{
GameData.Save();
}
}

#endregion
Expand Down
1 change: 1 addition & 0 deletions VirtueSky/DataStorage/Runtime/GameData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public static class GameData
private static Dictionary<string, byte[]> datas = new();
private const int INIT_SIZE = 64;

public static bool IsAutoSave { get; set; } = true;
public static event Action OnSaveEvent;

#region Internal Stuff
Expand Down
4 changes: 4 additions & 0 deletions VirtueSky/Iap/Runtime/IapDataVariable.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#if VIRTUESKY_IAP
using System;
using System.Threading.Tasks;
using Cysharp.Threading.Tasks;
using UnityEngine;
using UnityEngine.Purchasing;
using VirtueSky.Inspector;
Expand Down Expand Up @@ -43,11 +45,13 @@ public SubscriptionInfo GetSubscriptionInfo()

public void Purchase()
{
if (iapManager == null) return;
iapManager.PurchaseProduct(this);
}

public bool IsPurchased()
{
if (iapManager == null) return false;
return iapManager.IsPurchasedProduct(this);
}
}
Expand Down
2 changes: 1 addition & 1 deletion VirtueSky/Utils/Editor/UnityPackage/Note_Package.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- Version Max Sdk: 8.0.1
- Version Admob Sdk: v9.4.0
- Version Admob Sdk: v9.5.0
- Version IronSource (UnityLevelPlay) Skd: 8.4.0
- Version Google Game Play Service: v11.01
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "com.virtuesky.sunflower",
"displayName": "Sunflower",
"description": "Core ScriptableObject Architecture for building Unity games",
"version": "3.2.3",
"version": "3.2.4",
"unity": "2022.3",
"category": "virtuesky",
"license": "MIT",
Expand Down

0 comments on commit 93dda2c

Please sign in to comment.