Skip to content

Commit

Permalink
Merge pull request #19
Browse files Browse the repository at this point in the history
dev
  • Loading branch information
DucNV2000 authored Sep 17, 2024
2 parents 1a7f479 + b9e3159 commit 33322ea
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 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.0.3`
for version `3.0.4`
```csharp
"com.virtuesky.sunflower":"https://github.com/VirtueSky/sunflower.git#3.0.3",
"com.virtuesky.sunflower":"https://github.com/VirtueSky/sunflower.git#3.0.4",
```

## Includes modules
Expand Down
6 changes: 6 additions & 0 deletions VirtueSky/Audio/Runtime/SoundComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ private void Awake()

internal void PlayAudioClip(AudioClip audioClip, bool isLooping, float volume)
{
if (audioClip == null)
{
Debug.LogError($"AudioClip is null");
return;
}

component.clip = audioClip;
component.loop = isLooping;
component.volume = volume;
Expand Down
2 changes: 1 addition & 1 deletion 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.0.3";
public const string VersionSunflower = "3.0.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
3 changes: 2 additions & 1 deletion VirtueSky/Core/BaseSO.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using UnityEngine;
using VirtueSky.Inspector;


namespace VirtueSky.Core
{
public class BaseSO : ScriptableObject, IEntity
{
[Space(10)] [SerializeField] [TextArea(2, 5)]
[GUIColor(0.8f, 1.0f, 0.6f), Space(10), SerializeField, TextArea(2, 5)]
private string description;

public void Enable()
Expand Down
12 changes: 6 additions & 6 deletions VirtueSky/Events/Runtime/Base_Event/BaseEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class BaseEvent : BaseSO, IEvent
#if UNITY_EDITOR

[ShowIf(nameof(ConditionShow))]
[Button("Raise")]
[GUIColor(0.6f, 0.9f, 1.0f), Button("Raise")]
private void DebugRaiseEvent()
{
Raise();
Expand Down Expand Up @@ -82,11 +82,11 @@ public class BaseEvent<TType> : BaseSO, IEvent<TType>
readonly List<IEventListener<TType>> listeners = new List<IEventListener<TType>>();
private Action<TType> onRaised = null;
#if UNITY_EDITOR
[Space(10)] [ShowIf(nameof(ConditionShow))] [SerializeField]
[Space(10)] [ShowIf(nameof(ConditionShow))] [GUIColor(0.6f, 0.9f, 1.0f), SerializeField]
private TType valueDebug = default(TType);

[ShowIf(nameof(ConditionShow))]
[Button("Raise")]
[GUIColor(0.6f, 0.9f, 1.0f), Button("Raise")]
private void DebugRaiseEvent()
{
Raise(valueDebug);
Expand Down Expand Up @@ -153,14 +153,14 @@ public class BaseEvent<TType, TResult> : BaseSO, IEvent<TType, TResult>
private Func<TType, TResult> onRaised = null;

#if UNITY_EDITOR
[Space(10)] [ShowIf(nameof(ConditionShow))] [SerializeField]
[Space(10)] [ShowIf(nameof(ConditionShow))] [GUIColor(0.6f, 0.9f, 1.0f), SerializeField]
private TType valueDebug = default(TType);

[ShowIf(nameof(ConditionShow))] [ReadOnly, SerializeField]
[ShowIf(nameof(ConditionShow))] [GUIColor(0.6f, 0.9f, 1.0f), ReadOnly, SerializeField]
private TResult valueResult = default(TResult);

[ShowIf(nameof(ConditionShow))]
[Button("Raise")]
[GUIColor(0.6f, 0.9f, 1.0f), Button("Raise")]
private void DebugRaiseEvent()
{
valueResult = Raise(valueDebug);
Expand Down
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.0.3",
"version": "3.0.4",
"unity": "2022.3",
"category": "virtuesky",
"license": "MIT",
Expand Down

0 comments on commit 33322ea

Please sign in to comment.