Skip to content

Commit

Permalink
- Fix TweenOption_Vector3Ex's field not Serialized.
Browse files Browse the repository at this point in the history
- Set default BoredAction_Wander.asset's moveSpeeed to 2.
  • Loading branch information
wojiuxuihuan committed Jun 30, 2024
1 parent e5ac895 commit 7f21d17
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 21 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## [4.3.9]
- Fix TweenOption_Vector3Ex's field not Serialized.

## [4.3.8]
- Add more Function modules.

Expand Down
2 changes: 1 addition & 1 deletion ProjectConfig~/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"com.threeyes.alivecursor.sdk": "4.3.8",
"com.threeyes.alivecursor.sdk": "4.3.9",
"com.beans.deform": "1.2.1",
"com.coffee.ui-effect": "4.0.0-preview.10",
"com.dbrizov.naughtyattributes": "2.1.4",
Expand Down
14 changes: 14 additions & 0 deletions Threeyes/HubSimulator/AliveCursorHub_Simulator.unity

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ MonoBehaviour:
m_Name: BoredAction_Wander
m_EditorClassIdentifier:
movementConfig:
moveSpeed: 1
moveSpeed: 2
rotateSpeed: 3
maxForce: 1
turnChance: 0.02
Expand Down
3 changes: 3 additions & 0 deletions Threeyes/Plugins/ThreeyesPlugin/Module/Action/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## [1.0.1]
- Fix TweenOption_Vector3Ex's field not Serialized.

## [1.0.1]
- Fix error when user using Newtonsoft.Json plugin.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,21 +360,21 @@ public class TweenOption_Vector3Ex : ActionOptionBase
public bool FadeOut { get { return fadeOut; } set { fadeOut = value; } }

//#Tween Type
private Vector3TweenType tweenType = Vector3TweenType.Common;
[SerializeField] Vector3TweenType tweenType = Vector3TweenType.Common;

//——Punch || Shake——
#if USE_NaughtyAttributes
[AllowNesting]
[ShowIf(EConditionOperator.Or, "IsPunchMode", "IsShakeMode")]
#endif
[Tooltip("Indicates how much will the punch vibrate")]
private int vibrato = 10;
[SerializeField] int vibrato = 10;
#if USE_NaughtyAttributes
[AllowNesting]
[ShowIf(EConditionOperator.Or, "IsPunchMode", "IsShakeMode")]
#endif
[Tooltip("If TRUE the tween will smoothly snap all values to integers")]
private bool snapping = false;
[SerializeField] bool snapping = false;

//——Punch——
#if USE_NaughtyAttributes
Expand All @@ -383,7 +383,7 @@ public class TweenOption_Vector3Ex : ActionOptionBase
#endif
[Range(0, 1)]
[Tooltip("Represents how much (0 to 1) the vector will go beyond the starting rotation when bouncing backwards. 1 creates a full oscillation between the punch rotation and the opposite rotation, while 0 oscillates only between the punch and the start rotation")]
private float elasticity = 1;
[SerializeField] float elasticity = 1;

//——Shake——
#if USE_NaughtyAttributes
Expand All @@ -392,14 +392,14 @@ public class TweenOption_Vector3Ex : ActionOptionBase
#endif
[Range(0, 180)]
[Tooltip("Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). Setting it to 0 will shake along a single direction.")]
private float randomness = 90;
[SerializeField] float randomness = 90;

#if USE_NaughtyAttributes
[AllowNesting]
[ShowIf(nameof(IsShakeMode))]
#endif
[Tooltip("If TRUE the shake will automatically fadeOut smoothly within the tween's duration, otherwise it will not")]
private bool fadeOut = true;
[SerializeField] bool fadeOut = true;

#region Experimental
//PS: These fields are interal for DOTween.Shake only, keep them for further usage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#if USE_NaughtyAttributes
using NaughtyAttributes;
#endif
#if USE_JsonDotNet
using Newtonsoft.Json;
#endif
#if USE_DOTween
using DG.Tweening;
#endif
Expand Down Expand Up @@ -40,13 +43,13 @@ protected override Tween CreateTween(ActionTweenRuntimeData<ActionConfig_TweenTr
switch (targetTransformType)
{
case TransformType.Position:
tween = options.isLocal ?
tween = options.IsLocal ?
receiver.DOLocalMove(endValue, duration) :
receiver.DOMove(endValue, duration); break;
case TransformType.Rotation:
tween = options.isLocal ?
receiver.DOLocalRotate(endValue, duration, options.rotateMode) :
receiver.DORotate(endValue, duration, options.rotateMode); break;
tween = options.IsLocal ?
receiver.DOLocalRotate(endValue, duration, options.RotateMode) :
receiver.DORotate(endValue, duration, options.RotateMode); break;
case TransformType.Scale:

tween = receiver.DOScale(endValue, duration); break;//PS:LocalScale only
Expand Down Expand Up @@ -96,19 +99,28 @@ public class ActionConfig_TweenTransform : ActionConfig_TweenVector3Base<TweenOp
[System.Serializable]
public class TweenOption_Transform : TweenOption_Vector3Ex
{
//Common
#if USE_JsonDotNet
[JsonIgnore]
#endif
public bool IsLocal { get { return isLocal; } set { isLocal = value; } }
#if USE_JsonDotNet
[JsonIgnore]
#endif
public RotateMode RotateMode { get { return rotateMode; } set { rotateMode = value; } }

//# Common
#if USE_NaughtyAttributes
[AllowNesting]
[ShowIf(nameof(IsLocalMode))]
#endif
public bool isLocal = true;//是否为局部坐标
[SerializeField] bool isLocal = true;//是否为局部坐标

//#Rotation
//# Rotation
#if USE_NaughtyAttributes
[AllowNesting]
[ShowIf(nameof(IsRotateCommonMode))]
#endif
public RotateMode rotateMode = RotateMode.Fast;
[SerializeField] RotateMode rotateMode = RotateMode.Fast;

#region NaughtAttribute
[HideInInspector] public TransformType transformType = TransformType.Position; //#Common Setting (Runtime SetUp by SOAction_TweenTransform)(PS:仅用于NaughtAttribute的其他字段判断,不使用该值)
Expand Down
2 changes: 1 addition & 1 deletion Threeyes/Plugins/ThreeyesPlugin/Module/Action/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "com.threeyes.action",
"displayName": "Threeyes Action",
"description": "Use ScriptableObject to store&execute waitable Action configs, support reuse and dynamic modification of configurations.",
"version": "1.0.1",
"version": "1.0.2",
"unity": "2021.3",
"author":
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ MonoBehaviour:
m_Name: BoredAction_Wander
m_EditorClassIdentifier:
movementConfig:
moveSpeed: 1
moveSpeed: 2
rotateSpeed: 3
maxForce: 1
turnChance: 0.02
Expand Down
4 changes: 2 additions & 2 deletions UMod/Resources/Editor/ModToolsSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ MonoBehaviour:
toolsIconSmall: {fileID: 2800000, guid: 01d03c0fabb5c7249b6605e98a09beac, type: 3}
toolsIconLarge: {fileID: 2800000, guid: 01d03c0fabb5c7249b6605e98a09beac, type: 3}
toolsName: AliveCursorSDK
toolsVersion: 4.3.8
toolsVersion: 4.3.9
firstRunWindow:
assemblyQualifiedName:
developerName: Threeyes
syncDeveloperName: 0
gameName: AliveCursor
syncGameName: 0
gameVersion: 4.3.8
gameVersion: 4.3.9
syncGameVersion: 1
modFileExtension: .umod
commandLineLaunchFormat: +mod=$PATH
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.threeyes.alivecursor.sdk",
"displayName": "AliveCursorSDK",
"version": "4.3.8",
"version": "4.3.9",
"unity": "2022.3",
"description": "SDK for AliveCursor.",
"documentationUrl": "https://github.com/Threeyes/AliveCursorSDK/wiki",
Expand Down

0 comments on commit 7f21d17

Please sign in to comment.