Skip to content

Commit

Permalink
Merge pull request #17 from wolf-org/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
VirtueSky authored Oct 2, 2024
2 parents 9ad4aac + c6db4d9 commit a94367b
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 14 deletions.
18 changes: 18 additions & 0 deletions Module/Advertising/Runtime/General/Advertising.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
using System;
using System.Collections;
using System.Collections.Generic;

#if UNITY_IOS
using Unity.Advertisement.IosSupport;
#endif

#if VIRTUESKY_ADMOB
using GoogleMobileAds.Api;
using GoogleMobileAds.Ump.Api;
Expand Down Expand Up @@ -51,7 +56,20 @@ private void Start()
if (adSettings.EnableGDPR)
{
#if VIRTUESKY_ADMOB
#if UNITY_IOS
if (ATTrackingStatusBinding.GetAuthorizationTrackingStatus() ==
ATTrackingStatusBinding.AuthorizationTrackingStatus.AUTHORIZED)
{
InitGDPR();
}
else
{
InitAdClient();
}
#else
InitGDPR();
#endif

#endif
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"GUID:ba00a69c89ab3a94d84d27e0051afcfd",
"GUID:324caed91501a9c47a04ebfd87b68794",
"GUID:760a4c7888534400e882b82c5b3fba06",
"GUID:f51ebe6a0ceec4240a699833d6309b23"
"GUID:f51ebe6a0ceec4240a699833d6309b23",
"GUID:00c479e63b1c74419820a39073267645"
],
"includePlatforms": [],
"excludePlatforms": [],
Expand Down
6 changes: 6 additions & 0 deletions Module/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 Module/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 VersionUnityCommon = "1.3.6";
public const string VersionUnityCommon = "1.3.7";
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
2 changes: 0 additions & 2 deletions Module/PrimeTween/Runtime/Easing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ internal float Evaluate(float interpolationFactor) {
}
#endif

#if PRIME_TWEEN_DOTWEEN_ADAPTER || PRIME_TWEEN_EXPERIMENTAL
public static float Evaluate(float interpolationFactor, Ease ease) {
switch (ease) {
case Ease.Custom:
Expand All @@ -177,7 +176,6 @@ public static float Evaluate(float interpolationFactor, Ease ease) {
return StandardEasing.Evaluate(interpolationFactor, ease);
}
}
#endif
}

internal enum ParametricEase {
Expand Down
3 changes: 3 additions & 0 deletions Module/PrimeTween/Runtime/Internal/ReusableTween.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ internal bool updateAndCheckIfRunning(float dt) {
}
if (!_isPaused) {
SetElapsedTimeTotal(elapsedTimeTotal + dt * timeScale);
} else if (isUnityTargetDestroyed()) {
EmergencyStop(true);
return false;
}
return _isAlive;
}
Expand Down
4 changes: 0 additions & 4 deletions Module/PrimeTween/Runtime/Internal/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,6 @@ internal static (PropType, Type) TweenTypeToTweenData(TweenType tweenType) {
#endif
case TweenType.None:
return (PropType.None, null);
#if PRIME_TWEEN_PRO
case TweenType.TweenComponent:
return (PropType.None, typeof(PrimeTween.TweenComponent));
#endif
case TweenType.Delay:
return (PropType.Float, null);
case TweenType.Callback:
Expand Down
5 changes: 4 additions & 1 deletion Module/PrimeTween/Runtime/Sequence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace PrimeTween {
#if !ENABLE_SERIALIZATION && UNITY_2020_3_OR_NEWER
readonly // duration setter produces error in Unity <= 2019.4.40: error CS1604: Cannot assign to 'this' because it is read-only
#endif
partial struct Sequence {
partial struct Sequence : IEquatable<Sequence> {
const int emptySequenceTag = -43;
internal
#if !ENABLE_SERIALIZATION && UNITY_2020_3_OR_NEWER
Expand Down Expand Up @@ -613,5 +613,8 @@ public Sequence OnComplete<T>(T target, Action<T> onComplete, bool warnIfTargetD
root.OnComplete(target, onComplete, warnIfTargetDestroyed);
return this;
}

public override int GetHashCode() => root.GetHashCode();
public bool Equals(Sequence other) => root.Equals(other.root);
}
}
6 changes: 5 additions & 1 deletion Module/PrimeTween/Runtime/Tween.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace PrimeTween {
#if !ENABLE_SERIALIZATION
readonly
#endif
partial struct Tween {
partial struct Tween : IEquatable<Tween> {
/// Uniquely identifies the tween.
/// Can be observed from the Debug Inspector if PRIME_TWEEN_INSPECTOR_DEBUGGING is defined. Use only for debugging purposes.
internal
Expand Down Expand Up @@ -332,5 +332,9 @@ public Tween OnUpdate<T>(T target, Action<T, Tween> onUpdate) where T : class {
}

internal float durationWithWaitDelay => tween.calcDurationWithWaitDependencies();

public override int GetHashCode() => id.GetHashCode();
/// https://www.jacksondunstan.com/articles/5148
public bool Equals(Tween other) => isAlive && other.isAlive && id == other.id;
}
}
2 changes: 1 addition & 1 deletion Module/PrimeTween/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.1.20
v1.1.22
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 `1.3.6`
for version `1.3.7`
```csharp
"com.wolf-org.sunflower2":"https://github.com/wolf-org/sunflower_2.git#1.3.6",
"com.wolf-org.sunflower2":"https://github.com/wolf-org/sunflower_2.git#1.3.7",
```

## Includes modules
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.wolf-org.sunflower2",
"displayName": "Sunflower2",
"description": "Core singleton for building Unity games ",
"version": "1.3.6",
"version": "1.3.7",
"unity": "2022.3",
"category": "virtuesky",
"license": "MIT",
Expand Down

0 comments on commit a94367b

Please sign in to comment.