From 2df35afe6c9a7665bac09519a98b495c0ddd0425 Mon Sep 17 00:00:00 2001 From: DucNV Date: Wed, 2 Oct 2024 15:47:01 +0700 Subject: [PATCH 1/3] - add define symbol (PRIME_TWEEN_SAFETY_CHECKS) --- VirtueSky/ControlPanel/CPScriptingDefineSymbolsDrawer.cs | 1 + VirtueSky/Utils/Editor/ConstantDefineSymbols.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/VirtueSky/ControlPanel/CPScriptingDefineSymbolsDrawer.cs b/VirtueSky/ControlPanel/CPScriptingDefineSymbolsDrawer.cs index 430ef5d7..fc9fb89a 100644 --- a/VirtueSky/ControlPanel/CPScriptingDefineSymbolsDrawer.cs +++ b/VirtueSky/ControlPanel/CPScriptingDefineSymbolsDrawer.cs @@ -28,6 +28,7 @@ public static void OnDrawScriptingDefineSymbols() CPUtility.DrawButtonAddDefineSymbols(ConstantDefineSymbols.VIRTUESKY_NOTIFICATION); CPUtility.DrawButtonAddDefineSymbols(ConstantDefineSymbols.VIRTUESKY_APPSFLYER); CPUtility.DrawButtonAddDefineSymbols(ConstantDefineSymbols.PRIME_TWEEN_DOTWEEN_ADAPTER); + CPUtility.DrawButtonAddDefineSymbols(ConstantDefineSymbols.PRIME_TWEEN_SAFETY_CHECKS); CPUtility.DrawButtonAddDefineSymbols(ConstantDefineSymbols.VIRTUESKY_APPLE_AUTH); CPUtility.DrawButtonAddDefineSymbols(ConstantDefineSymbols.VIRTUESKY_GPGS); CPUtility.DrawButtonAddDefineSymbols(ConstantDefineSymbols.VIRTUESKY_SKELETON); diff --git a/VirtueSky/Utils/Editor/ConstantDefineSymbols.cs b/VirtueSky/Utils/Editor/ConstantDefineSymbols.cs index cadd143d..14e00d99 100644 --- a/VirtueSky/Utils/Editor/ConstantDefineSymbols.cs +++ b/VirtueSky/Utils/Editor/ConstantDefineSymbols.cs @@ -15,6 +15,7 @@ public class ConstantDefineSymbols public const string VIRTUESKY_NOTIFICATION = "VIRTUESKY_NOTIFICATION"; public const string VIRTUESKY_APPSFLYER = "VIRTUESKY_APPSFLYER"; public const string PRIME_TWEEN_DOTWEEN_ADAPTER = "PRIME_TWEEN_DOTWEEN_ADAPTER"; + public const string PRIME_TWEEN_SAFETY_CHECKS = "PRIME_TWEEN_SAFETY_CHECKS"; public const string VIRTUESKY_GPGS = "VIRTUESKY_GPGS"; public const string VIRTUESKY_APPLE_AUTH = "VIRTUESKY_APPLE_AUTH"; public const string VIRTUESKY_SKELETON = "VIRTUESKY_SKELETON"; From ccf758f64bab4314c6018940ff644566d143c530 Mon Sep 17 00:00:00 2001 From: DucNV Date: Wed, 2 Oct 2024 16:00:41 +0700 Subject: [PATCH 2/3] - add AudioHelper --- VirtueSky/Audio/Runtime/AudioHelper.cs | 17 +++++++++++++++++ VirtueSky/Audio/Runtime/AudioHelper.cs.meta | 3 +++ 2 files changed, 20 insertions(+) create mode 100644 VirtueSky/Audio/Runtime/AudioHelper.cs create mode 100644 VirtueSky/Audio/Runtime/AudioHelper.cs.meta diff --git a/VirtueSky/Audio/Runtime/AudioHelper.cs b/VirtueSky/Audio/Runtime/AudioHelper.cs new file mode 100644 index 00000000..be4ad4e5 --- /dev/null +++ b/VirtueSky/Audio/Runtime/AudioHelper.cs @@ -0,0 +1,17 @@ +namespace VirtueSky.Audio +{ + public static class AudioHelper + { + public static SoundCache PlaySfx(this SoundData soundData, PlaySfxEvent playSfxEvent) => playSfxEvent.Raise(soundData); + public static void PauseSfx(this SoundCache soundCache, PauseSfxEvent pauseSfxEvent) => pauseSfxEvent.Raise(soundCache); + public static void StopSfx(this SoundCache soundCache, StopSfxEvent stopSfxEvent) => stopSfxEvent.Raise(soundCache); + public static void ResumeSfx(this SoundCache soundCache, ResumeSfxEvent resumeSfxEvent) => resumeSfxEvent.Raise(soundCache); + public static void FinishSfx(this SoundCache soundCache, FinishSfxEvent finishSfxEvent) => finishSfxEvent.Raise(soundCache); + public static void StopAllSfx(this StopAllSfxEvent stopAllSfxEvent) => stopAllSfxEvent.Raise(); + + public static void PlayMusic(this SoundData soundData, PlayMusicEvent playMusicEvent) => playMusicEvent.Raise(soundData); + public static void StopMusic(this StopMusicEvent stopMusicEvent) => stopMusicEvent.Raise(); + public static void PauseMusic(this PauseMusicEvent pauseMusicEvent) => pauseMusicEvent.Raise(); + public static void ResumeMusic(this ResumeMusicEvent resumeMusicEvent) => resumeMusicEvent.Raise(); + } +} \ No newline at end of file diff --git a/VirtueSky/Audio/Runtime/AudioHelper.cs.meta b/VirtueSky/Audio/Runtime/AudioHelper.cs.meta new file mode 100644 index 00000000..9931f370 --- /dev/null +++ b/VirtueSky/Audio/Runtime/AudioHelper.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c28340e8673e4449905ac4eafb9b8bb1 +timeCreated: 1727858865 \ No newline at end of file From 038a3f731a6da8ef9980a2b3079dd543d352f4e7 Mon Sep 17 00:00:00 2001 From: DucNV Date: Wed, 2 Oct 2024 16:18:53 +0700 Subject: [PATCH 3/3] - update --- README.md | 4 ++-- VirtueSky/ControlPanel/ConstantPackage.cs | 2 +- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index eccc1d6e..ccd1198a 100644 --- a/README.md +++ b/README.md @@ -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.0.6` +for version `3.0.7` ```csharp -"com.virtuesky.sunflower":"https://github.com/VirtueSky/sunflower.git#3.0.6", +"com.virtuesky.sunflower":"https://github.com/VirtueSky/sunflower.git#3.0.7", ``` ## Includes modules diff --git a/VirtueSky/ControlPanel/ConstantPackage.cs b/VirtueSky/ControlPanel/ConstantPackage.cs index 02fc7260..84ca4e17 100644 --- a/VirtueSky/ControlPanel/ConstantPackage.cs +++ b/VirtueSky/ControlPanel/ConstantPackage.cs @@ -2,7 +2,7 @@ { public class ConstantPackage { - public const string VersionSunflower = "3.0.6"; + public const string VersionSunflower = "3.0.7"; public const string PackageNameInAppPurchase = "com.unity.purchasing"; public const string MaxVersionInAppPurchase = "4.12.2"; public const string PackageNameNewtonsoftJson = "com.unity.nuget.newtonsoft-json"; diff --git a/package.json b/package.json index 60ec8a65..2d80e1b8 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "com.virtuesky.sunflower", "displayName": "Sunflower", "description": "Core ScriptableObject Architecture for building Unity games", - "version": "3.0.6", + "version": "3.0.7", "unity": "2022.3", "category": "virtuesky", "license": "MIT",