2 Commits

Author SHA1 Message Date
Chris
8f3ea1a491 maint: various clean up, movement tweaks, and smoothing fixes 2025-09-29 21:10:22 -04:00
Chris
535aa1797d maint: testing ui is now a prefab 2025-09-26 16:18:18 -04:00
25 changed files with 59575 additions and 4139 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 33c0a8ce87e01664d9125d68202da166
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,5 +1,5 @@
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False"> <ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
<ui:VisualElement name="SinglePage" style="background-color: rgba(204, 142, 84, 0.31); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; border-left-color: rgba(255, 160, 61, 0.94); border-right-color: rgba(255, 160, 61, 0.94); border-top-color: rgba(255, 160, 61, 0.94); border-bottom-color: rgba(255, 160, 61, 0.94); border-top-width: 7px; border-right-width: 0.5px; border-bottom-width: 0.5px; border-left-width: 0.5px; width: auto; margin-right: 12px; max-width: 175px;"> <ui:VisualElement name="SinglePage" picking-mode="Ignore" style="background-color: rgba(204, 142, 84, 0.31); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; border-left-color: rgba(255, 160, 61, 0.94); border-right-color: rgba(255, 160, 61, 0.94); border-top-color: rgba(255, 160, 61, 0.94); border-bottom-color: rgba(255, 160, 61, 0.94); border-top-width: 7px; border-right-width: 0.5px; border-bottom-width: 0.5px; border-left-width: 0.5px; width: auto; margin-right: 12px; max-width: 175px;">
<ui:Label text="Page Label" name="PageLabel" style="padding-right: 10px; padding-left: 10px; color: rgb(255, 255, 255); -unity-font-style: bold; padding-top: 10px; padding-bottom: 10px; flex-shrink: 1;" /> <ui:Label text="Page Label" name="PageLabel" style="padding-right: 10px; padding-left: 10px; color: rgb(255, 255, 255); -unity-font-style: bold; padding-top: 10px; padding-bottom: 10px; flex-shrink: 1;" />
</ui:VisualElement> </ui:VisualElement>
</ui:UXML> </ui:UXML>

View File

@@ -1,5 +1,5 @@
<ui:UXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True"> <ui:UXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True">
<ui:VisualElement style="flex-grow: 1; justify-content: center; padding-top: 60px; padding-right: 60px; padding-bottom: 60px; padding-left: 60px;"> <ui:VisualElement picking-mode="Ignore" style="flex-grow: 1; justify-content: center; padding-top: 60px; padding-right: 60px; padding-bottom: 60px; padding-left: 60px;">
<ui:VisualElement style="flex-grow: 0; padding-top: 15px; padding-right: 150px; padding-bottom: 15px; padding-left: 15px; background-color: rgba(34, 43, 46, 0.54); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; align-items: flex-start; align-self: flex-start;"> <ui:VisualElement style="flex-grow: 0; padding-top: 15px; padding-right: 150px; padding-bottom: 15px; padding-left: 15px; background-color: rgba(34, 43, 46, 0.54); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; align-items: flex-start; align-self: flex-start;">
<ui:Label text="Waiting for a controller input..." style="color: rgb(255, 255, 255); font-size: 24px; -unity-font-style: bold;" /> <ui:Label text="Waiting for a controller input..." style="color: rgb(255, 255, 255); font-size: 24px; -unity-font-style: bold;" />
<ui:Label text="Press any button on a controller" style="color: rgb(255, 255, 255);" /> <ui:Label text="Press any button on a controller" style="color: rgb(255, 255, 255);" />

View File

@@ -24,3 +24,23 @@ MonoBehaviour:
SourcePrefabToOverride: {fileID: 0} SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0 SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0} OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 2757828562731694833, guid: 7da6b9047372a5742ba2987b05058116, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 2439326541263862202, guid: 95d2e4101fc718f44a20928f1d2905fe, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 2757828562731694833, guid: da90c92b396d2db4796783b8ddc02b0c, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 2439326541263862202, guid: 9972d2c78bee8f342b22a66d3dc76255, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}

View File

@@ -0,0 +1,31 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dda436a9c8bbd4d109478acf25cd48d8, type: 3}
m_Name: IndustrialBuildingColors
m_EditorClassIdentifier:
m_Colors:
- {r: 0.38679248, g: 0.3833923, b: 0.38131902, a: 1}
- {r: 0.2735849, g: 0.25809896, b: 0.2516465, a: 1}
- {r: 0.44255075, g: 0.4692888, b: 0.6132076, a: 1}
- {r: 0.21698111, g: 0.19811809, b: 0.1975347, a: 1}
- {r: 0.6886792, g: 0.65442336, b: 0.57498217, a: 1}
- {r: 0.5283019, g: 0.50888515, b: 0.48593807, a: 1}
- {r: 0.9150943, g: 0.70547265, b: 0.375534, a: 1}
- {r: 1, g: 0.863, b: 0, a: 1}
- {r: 1, g: 0.522, b: 0.106, a: 1}
- {r: 1, g: 0.255, b: 0.212, a: 1}
- {r: 0.522, g: 0.078, b: 0.294, a: 1}
- {r: 0.941, g: 0.071, b: 0.745, a: 1}
- {r: 0.694, g: 0.051, b: 0.788, a: 1}
- {r: 0.067, g: 0.067, b: 0.067, a: 1}
- {r: 0.667, g: 0.667, b: 0.667, a: 1}
- {r: 0.867, g: 0.867, b: 0.867, a: 1}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: da1d1dce842c5ee4d916b5dcd4a91b55
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -128,11 +128,11 @@ GameObject:
- component: {fileID: 4712401716102697018} - component: {fileID: 4712401716102697018}
- component: {fileID: 2106585328495276993} - component: {fileID: 2106585328495276993}
- component: {fileID: 2129000951396423518} - component: {fileID: 2129000951396423518}
- component: {fileID: 2842793574603981349}
- component: {fileID: 43868462096200776} - component: {fileID: 43868462096200776}
- component: {fileID: 6067609290387865387} - component: {fileID: 6067609290387865387}
- component: {fileID: 323016802234025917} - component: {fileID: 323016802234025917}
- component: {fileID: -6606553239814530074} - component: {fileID: -6606553239814530074}
- component: {fileID: 6546916578030478377}
m_Layer: 0 m_Layer: 0
m_Name: Player m_Name: Player
m_TagString: Untagged m_TagString: Untagged
@@ -210,13 +210,13 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
data: data:
directionChangingSoftness: directionChangingSoftness:
targetValue: 1 targetValue: 20
currentValue: 1 currentValue: 20
targetSmoothing: 1 targetSmoothing: 50
targetEasing: 2 targetEasing: 2
currentSmoothing: 1 currentSmoothing: 50
defaultValue: 1 defaultValue: 20
defaultSmoothing: 1 defaultSmoothing: 50
defaultEasing: 2 defaultEasing: 2
directionSpinningHardness: directionSpinningHardness:
targetValue: 30 targetValue: 30
@@ -224,7 +224,7 @@ MonoBehaviour:
targetSmoothing: 1 targetSmoothing: 1
targetEasing: 2 targetEasing: 2
currentSmoothing: 1 currentSmoothing: 1
defaultValue: 3 defaultValue: 30
defaultSmoothing: 1 defaultSmoothing: 1
defaultEasing: 2 defaultEasing: 2
directionSpinningSpeed: directionSpinningSpeed:
@@ -233,16 +233,16 @@ MonoBehaviour:
targetSmoothing: 1 targetSmoothing: 1
targetEasing: 2 targetEasing: 2
currentSmoothing: 1 currentSmoothing: 1
defaultValue: 3 defaultValue: 5
defaultSmoothing: 1 defaultSmoothing: 1
defaultEasing: 2 defaultEasing: 2
airDirectionDecay: airDirectionDecay:
targetValue: 1 targetValue: 0.88
currentValue: 1 currentValue: 0.88
targetSmoothing: 1 targetSmoothing: 1
targetEasing: 2 targetEasing: 2
currentSmoothing: 1 currentSmoothing: 1
defaultValue: 1 defaultValue: 0.88
defaultSmoothing: 1 defaultSmoothing: 1
defaultEasing: 2 defaultEasing: 2
acceleration: acceleration:
@@ -251,7 +251,7 @@ MonoBehaviour:
targetSmoothing: 1 targetSmoothing: 1
targetEasing: 2 targetEasing: 2
currentSmoothing: 1 currentSmoothing: 1
defaultValue: 5 defaultValue: 28
defaultSmoothing: 1 defaultSmoothing: 1
defaultEasing: 2 defaultEasing: 2
deacceleration: deacceleration:
@@ -260,7 +260,7 @@ MonoBehaviour:
targetSmoothing: 1 targetSmoothing: 1
targetEasing: 2 targetEasing: 2
currentSmoothing: 1 currentSmoothing: 1
defaultValue: 5 defaultValue: 20
defaultSmoothing: 1 defaultSmoothing: 1
defaultEasing: 2 defaultEasing: 2
moveSpeed: moveSpeed:
@@ -284,29 +284,29 @@ MonoBehaviour:
gravityMax: gravityMax:
targetValue: 4 targetValue: 4
currentValue: 4 currentValue: 4
targetSmoothing: 1 targetSmoothing: 100
targetEasing: 2 targetEasing: 2
currentSmoothing: 1 currentSmoothing: 100
defaultValue: 8 defaultValue: 4
defaultSmoothing: 1 defaultSmoothing: 100
defaultEasing: 2 defaultEasing: 2
gravityAcceleration: gravityAcceleration:
targetValue: 15 targetValue: 10
currentValue: 15 currentValue: 10
targetSmoothing: 1 targetSmoothing: 100
targetEasing: 2 targetEasing: 20
currentSmoothing: 1 currentSmoothing: 100
defaultValue: 1 defaultValue: 10
defaultSmoothing: 1 defaultSmoothing: 100
defaultEasing: 2 defaultEasing: 20
gravityScale: gravityScale:
targetValue: 1 targetValue: 2
currentValue: 1 currentValue: 2
targetSmoothing: 1 targetSmoothing: 100
targetEasing: 2 targetEasing: 2
currentSmoothing: 1 currentSmoothing: 100
defaultValue: 1 defaultValue: 2
defaultSmoothing: 1 defaultSmoothing: 100
defaultEasing: 2 defaultEasing: 2
facingDirection: facingDirection:
targetValue: 4 targetValue: 4
@@ -326,15 +326,6 @@ MonoBehaviour:
defaultValue: 5 defaultValue: 5
defaultSmoothing: 1 defaultSmoothing: 1
defaultEasing: 2 defaultEasing: 2
rotationInputBlending:
targetValue: 0.3
currentValue: 0.3
targetSmoothing: 1
targetEasing: 2
currentSmoothing: 1
defaultValue: 0.3
defaultSmoothing: 1
defaultEasing: 2
--- !u!114 &679199079481597207 --- !u!114 &679199079481597207
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -624,55 +615,7 @@ MonoBehaviour:
_preInitializeSubGraphs: 0 _preInitializeSubGraphs: 0
_updateMode: 0 _updateMode: 0
_graph: {fileID: 11400000, guid: dd633ec36fc4a2b4da964d9435368785, type: 2} _graph: {fileID: 11400000, guid: dd633ec36fc4a2b4da964d9435368785, type: 2}
_blackboard: {fileID: 2842793574603981349} _blackboard: {fileID: 6546916578030478377}
--- !u!114 &2842793574603981349
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2757828562731694833}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b98a6db0b653f764eac834f85857a9dd, type: 3}
m_Name:
m_EditorClassIdentifier:
_parentBlackboard: {fileID: 0}
_serializedBlackboard: '{"_variables":{"isGrounded":{"_propertyPath":"UnityEngine.CharacterController.isGrounded","_name":"isGrounded","_id":"09b3259f-8b50-439a-ab86-ea3d8a4916f1","$type":"NodeCanvas.Framework.Variable`1[[System.Boolean,
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"airMoveDirection":{"_name":"airMoveDirection","_id":"2fc91db6-09dd-4a1f-9195-426a0c44de31","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Vector3,
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},"groundMoveDirection":{"_name":"groundMoveDirection","_id":"a2c4fe25-9549-4bdd-8cec-2dbfc4a8856f","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Vector3,
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},"moveDirection":{"_name":"moveDirection","_id":"b2342f45-29ba-4805-adb4-6940dde8f4aa","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Vector3,
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},"currentSpeed":{"_name":"currentSpeed","_id":"f585caab-68c5-4ead-85c4-cbc16c18655e","$type":"NodeCanvas.Framework.Variable`1[[System.Single,
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"movementData":{"_propertyPath":"Reset.Units.UnitMovementHandler.data","_name":"movementData","_id":"357123c2-2d10-4425-a3c9-7341e810fc88","$type":"NodeCanvas.Framework.Variable`1[[Reset.Units.UnitMovementData,
Core, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},"outputMoveDirection":{"_propertyPath":"Reset.Units.UnitMovementHandler.outputMoveDirection","_name":"outputMoveDirection","_id":"3b9833f5-870a-4182-9824-e31a9896eec2","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Vector3,
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},"myVector3":{"_name":"myVector3","_id":"9367e2ee-ac93-43f7-9cd7-6a7cf167e07a","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Vector3,
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}}}'
_objectReferences: []
_serializedVariables:
- _json: '{"_propertyPath":"UnityEngine.CharacterController.isGrounded","_name":"isGrounded","_id":"09b3259f-8b50-439a-ab86-ea3d8a4916f1","$type":"NodeCanvas.Framework.Variable`1[[System.Boolean,
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"}'
_references: []
- _json: '{"_name":"airMoveDirection","_id":"2fc91db6-09dd-4a1f-9195-426a0c44de31","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Vector3,
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}'
_references: []
- _json: '{"_name":"groundMoveDirection","_id":"a2c4fe25-9549-4bdd-8cec-2dbfc4a8856f","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Vector3,
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}'
_references: []
- _json: '{"_name":"moveDirection","_id":"b2342f45-29ba-4805-adb4-6940dde8f4aa","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Vector3,
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}'
_references: []
- _json: '{"_name":"currentSpeed","_id":"f585caab-68c5-4ead-85c4-cbc16c18655e","$type":"NodeCanvas.Framework.Variable`1[[System.Single,
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"}'
_references: []
- _json: '{"_propertyPath":"Reset.Units.UnitMovementHandler.data","_name":"movementData","_id":"357123c2-2d10-4425-a3c9-7341e810fc88","$type":"NodeCanvas.Framework.Variable`1[[Reset.Units.UnitMovementData,
Core, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}'
_references: []
- _json: '{"_propertyPath":"Reset.Units.UnitMovementHandler.outputMoveDirection","_name":"outputMoveDirection","_id":"3b9833f5-870a-4182-9824-e31a9896eec2","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Vector3,
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}'
_references: []
- _json: '{"_name":"myVector3","_id":"9367e2ee-ac93-43f7-9cd7-6a7cf167e07a","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Vector3,
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}'
_references: []
--- !u!114 &43868462096200776 --- !u!114 &43868462096200776
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -772,6 +715,47 @@ MonoBehaviour:
toolAbility1: {fileID: 0} toolAbility1: {fileID: 0}
toolAbility2: {fileID: 0} toolAbility2: {fileID: 0}
storedItems: [] storedItems: []
--- !u!114 &6546916578030478377
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2757828562731694833}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b98a6db0b653f764eac834f85857a9dd, type: 3}
m_Name:
m_EditorClassIdentifier: ParadoxNotion::NodeCanvas.Framework.Blackboard
_parentBlackboard: {fileID: 0}
_serializedBlackboard: '{"_variables":{"Resolved Movement":{"_value":{},"_name":"Resolved
Movement","_id":"58618e1a-1bf3-4346-a961-2787a78116fa","$type":"NodeCanvas.Framework.Variable`1[[NodeCanvas.Framework.VariableSeperator,
ParadoxNotion, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},"resolvedMoveVector2":{"_name":"resolvedMoveVector2","_id":"2aee664e-07ba-4e85-9d6a-a1393398789d","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Vector2,
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},"resolvedMoveVector3":{"_name":"resolvedMoveVector3","_id":"5d907161-2896-4b95-bfd2-0ea9426145d7","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Vector3,
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},"resolvedGravity":{"_name":"resolvedGravity","_id":"7c9d4632-c537-44c4-ae35-d92fa64d5303","$type":"NodeCanvas.Framework.Variable`1[[System.Single,
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"resolvedSpeed":{"_name":"resolvedSpeed","_id":"a81cae83-1fb4-4a2c-bc68-ebf1781c2037","$type":"NodeCanvas.Framework.Variable`1[[System.Single,
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"resolvedRotation":{"_name":"resolvedRotation","_id":"f2ba350a-0fea-438e-9ad3-ed77db853d34","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Vector3,
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}}}'
_objectReferences: []
_serializedVariables:
- _json: '{"_value":{},"_name":"Resolved Movement","_id":"58618e1a-1bf3-4346-a961-2787a78116fa","$type":"NodeCanvas.Framework.Variable`1[[NodeCanvas.Framework.VariableSeperator,
ParadoxNotion, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}'
_references: []
- _json: '{"_name":"resolvedMoveVector2","_id":"2aee664e-07ba-4e85-9d6a-a1393398789d","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Vector2,
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}'
_references: []
- _json: '{"_name":"resolvedMoveVector3","_id":"5d907161-2896-4b95-bfd2-0ea9426145d7","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Vector3,
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}'
_references: []
- _json: '{"_name":"resolvedGravity","_id":"7c9d4632-c537-44c4-ae35-d92fa64d5303","$type":"NodeCanvas.Framework.Variable`1[[System.Single,
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"}'
_references: []
- _json: '{"_name":"resolvedSpeed","_id":"a81cae83-1fb4-4a2c-bc68-ebf1781c2037","$type":"NodeCanvas.Framework.Variable`1[[System.Single,
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"}'
_references: []
- _json: '{"_name":"resolvedRotation","_id":"f2ba350a-0fea-438e-9ad3-ed77db853d34","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Vector3,
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}'
_references: []
--- !u!1 &9138484595871696647 --- !u!1 &9138484595871696647
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

File diff suppressed because it is too large Load Diff

View File

@@ -71,8 +71,10 @@ MonoBehaviour:
instantiationMode: 1 instantiationMode: 1
- dependency: {fileID: 2800000, guid: 3ee40aa79cd242a5b53b0b0ca4f13f0f, type: 3} - dependency: {fileID: 2800000, guid: 3ee40aa79cd242a5b53b0b0ca4f13f0f, type: 3}
instantiationMode: 1 instantiationMode: 1
- dependency: {fileID: 1188886080723375499, guid: 33c0a8ce87e01664d9125d68202da166, type: 3}
instantiationMode: 1
- dependency: {fileID: 3608368543505542050, guid: 222e4e6c5bda2b64da9c38abf6dc55bb, type: 3} - dependency: {fileID: 3608368543505542050, guid: 222e4e6c5bda2b64da9c38abf6dc55bb, type: 3}
instantiationMode: 0 instantiationMode: 1
- dependency: {fileID: 2800000, guid: b5eeec78a0081094cb8dfeb83808d762, type: 3} - dependency: {fileID: 2800000, guid: b5eeec78a0081094cb8dfeb83808d762, type: 3}
instantiationMode: 1 instantiationMode: 1
- dependency: {fileID: 2800000, guid: 2fd6421f253b4ef1a19526541f9ffc0c, type: 3} - dependency: {fileID: 2800000, guid: 2fd6421f253b4ef1a19526541f9ffc0c, type: 3}
@@ -93,30 +95,36 @@ MonoBehaviour:
instantiationMode: 1 instantiationMode: 1
- dependency: {fileID: 9197481963319205126, guid: 5bbda06c82d8c77478a2f5e7cc4e1f38, type: 3} - dependency: {fileID: 9197481963319205126, guid: 5bbda06c82d8c77478a2f5e7cc4e1f38, type: 3}
instantiationMode: 1 instantiationMode: 1
- dependency: {fileID: 2100000, guid: fc673b0198d5ba84eb7adf6355372885, type: 2}
instantiationMode: 1
- dependency: {fileID: 2800000, guid: ee148e281f3c41c5b4ff5f8a5afe5a6c, type: 3} - dependency: {fileID: 2800000, guid: ee148e281f3c41c5b4ff5f8a5afe5a6c, type: 3}
instantiationMode: 1 instantiationMode: 1
- dependency: {fileID: 11400000, guid: 5985c652269d3a64598d9e8dfc2c16d2, type: 2} - dependency: {fileID: 11400000, guid: 5985c652269d3a64598d9e8dfc2c16d2, type: 2}
instantiationMode: 1 instantiationMode: 1
- dependency: {fileID: 2800000, guid: 6344bf96fbda94141a525046d088fb23, type: 3} - dependency: {fileID: 2800000, guid: 6344bf96fbda94141a525046d088fb23, type: 3}
instantiationMode: 0 instantiationMode: 1
- dependency: {fileID: 1151346671008021326, guid: 2a908c14dd3788e42950bd6e254490ed, type: 3} - dependency: {fileID: 1151346671008021326, guid: 2a908c14dd3788e42950bd6e254490ed, type: 3}
instantiationMode: 0 instantiationMode: 1
- dependency: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - dependency: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
instantiationMode: 1 instantiationMode: 1
- dependency: {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} - dependency: {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
instantiationMode: 0 instantiationMode: 1
- dependency: {fileID: 2800000, guid: b801395886e284228abc14afd369cb94, type: 3} - dependency: {fileID: 2800000, guid: b801395886e284228abc14afd369cb94, type: 3}
instantiationMode: 0 instantiationMode: 1
- dependency: {fileID: -4733365628477956816, guid: c025e3d6088af87438b13b80b34dcb7b, type: 3} - dependency: {fileID: -4733365628477956816, guid: c025e3d6088af87438b13b80b34dcb7b, type: 3}
instantiationMode: 1 instantiationMode: 1
- dependency: {fileID: 2439326541263862202, guid: d1a8be7fcb61fae4a8f61c1d003cc7a4, type: 3} - dependency: {fileID: 2439326541263862202, guid: d1a8be7fcb61fae4a8f61c1d003cc7a4, type: 3}
instantiationMode: 0 instantiationMode: 1
- dependency: {fileID: 6735058876567652660, guid: 86fe521c4bae13c4ab1ad5a357fe8d47, type: 3} - dependency: {fileID: 6735058876567652660, guid: 86fe521c4bae13c4ab1ad5a357fe8d47, type: 3}
instantiationMode: 0 instantiationMode: 1
- dependency: {fileID: 2800000, guid: 3028dc075ba8c584d9bc7d1e0255e038, type: 3} - dependency: {fileID: 2800000, guid: 3028dc075ba8c584d9bc7d1e0255e038, type: 3}
instantiationMode: 1 instantiationMode: 1
- dependency: {fileID: 2439326541263862202, guid: 9972d2c78bee8f342b22a66d3dc76255, type: 3}
instantiationMode: 1
- dependency: {fileID: 2757828562731694833, guid: da90c92b396d2db4796783b8ddc02b0c, type: 3}
instantiationMode: 1
- dependency: {fileID: 2100000, guid: c22777d6e868e4f2fb421913386b154e, type: 2} - dependency: {fileID: 2100000, guid: c22777d6e868e4f2fb421913386b154e, type: 2}
instantiationMode: 0 instantiationMode: 1
- dependency: {fileID: 11400000, guid: ec44b1e70d02d1642a18b6971abb0910, type: 2} - dependency: {fileID: 11400000, guid: ec44b1e70d02d1642a18b6971abb0910, type: 2}
instantiationMode: 1 instantiationMode: 1
- dependency: {fileID: 11400000, guid: beebc26815c062d4c80362506bb8ad84, type: 2} - dependency: {fileID: 11400000, guid: beebc26815c062d4c80362506bb8ad84, type: 2}
@@ -126,13 +134,13 @@ MonoBehaviour:
- dependency: {fileID: 11400000, guid: 40971083372a2534babfd95df6867650, type: 2} - dependency: {fileID: 11400000, guid: 40971083372a2534babfd95df6867650, type: 2}
instantiationMode: 1 instantiationMode: 1
- dependency: {fileID: 2757828562731694833, guid: 091cfac8be4c5a144a0b8997a9f1ff28, type: 3} - dependency: {fileID: 2757828562731694833, guid: 091cfac8be4c5a144a0b8997a9f1ff28, type: 3}
instantiationMode: 0 instantiationMode: 1
- dependency: {fileID: 2800000, guid: 3327a326efc0c4079a8eada111b11d29, type: 3} - dependency: {fileID: 2800000, guid: 3327a326efc0c4079a8eada111b11d29, type: 3}
instantiationMode: 1 instantiationMode: 1
- dependency: {fileID: 11400000, guid: dd633ec36fc4a2b4da964d9435368785, type: 2} - dependency: {fileID: 11400000, guid: dd633ec36fc4a2b4da964d9435368785, type: 2}
instantiationMode: 1 instantiationMode: 1
- dependency: {fileID: 3716971538123186913, guid: 6ae1b39ffbe1f0f468d521bb08a8b547, type: 3} - dependency: {fileID: 3716971538123186913, guid: 6ae1b39ffbe1f0f468d521bb08a8b547, type: 3}
instantiationMode: 0 instantiationMode: 1
- dependency: {fileID: 2800000, guid: 40265a896a0f341bb956e90c59025a29, type: 3} - dependency: {fileID: 2800000, guid: 40265a896a0f341bb956e90c59025a29, type: 3}
instantiationMode: 1 instantiationMode: 1
- dependency: {fileID: 11400000, guid: a15c6b1054c8b5b40ae430307e706008, type: 2} - dependency: {fileID: 11400000, guid: a15c6b1054c8b5b40ae430307e706008, type: 2}
@@ -142,9 +150,9 @@ MonoBehaviour:
- dependency: {fileID: 9197481963319205126, guid: 15d71cf51a4522243a18f0eb02136f97, type: 3} - dependency: {fileID: 9197481963319205126, guid: 15d71cf51a4522243a18f0eb02136f97, type: 3}
instantiationMode: 1 instantiationMode: 1
- dependency: {fileID: 2800000, guid: fca1c462b5714044698de6793787093a, type: 3} - dependency: {fileID: 2800000, guid: fca1c462b5714044698de6793787093a, type: 3}
instantiationMode: 0 instantiationMode: 1
- dependency: {fileID: 7218013819213371140, guid: 136addde66736f1479236356a1aa202a, type: 3} - dependency: {fileID: 7218013819213371140, guid: 136addde66736f1479236356a1aa202a, type: 3}
instantiationMode: 0 instantiationMode: 1
- dependency: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} - dependency: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
instantiationMode: 1 instantiationMode: 1
- dependency: {fileID: 2800000, guid: 57da91ef0c2a5489891995dc81537253, type: 3} - dependency: {fileID: 2800000, guid: 57da91ef0c2a5489891995dc81537253, type: 3}

File diff suppressed because it is too large Load Diff

View File

@@ -28,6 +28,8 @@ namespace Reset.Units {
FloatValueGroup.UpdateValue(gravityMax, agent.data.gravityMax); FloatValueGroup.UpdateValue(gravityMax, agent.data.gravityMax);
FloatValueGroup.UpdateValue(gravityAcceleration, agent.data.gravityAcceleration); FloatValueGroup.UpdateValue(gravityAcceleration, agent.data.gravityAcceleration);
FloatValueGroup.UpdateValue(gravityScale, agent.data.gravityScale); FloatValueGroup.UpdateValue(gravityScale, agent.data.gravityScale);
EndAction(true);
} }
//Called once per frame while the action is active. //Called once per frame while the action is active.

View File

@@ -0,0 +1,67 @@
using NodeCanvas.Framework;
using ParadoxNotion.Design;
using UnityEngine;
namespace Reset.Units {
[Category("Reset/Movement")]
[Description("Fetch and save various parts of the movement data")]
public class GetResolvedMovementData : ActionTask<UnitMovementHandler>{
public BBParameter<Vector2> resolvedVector2;
public BBParameter<Vector3> resolvedVector3;
public BBParameter<float> resolvedGravity;
public BBParameter<float> resolvedSpeed;
public BBParameter<Quaternion> resolvedRotation;
//Use for initialization. This is called only once in the lifetime of the task.
//Return null if init was successfull. Return an error string otherwise
protected override string OnInit() {
return null;
}
//This is called once each time the task is enabled.
//Call EndAction() to mark the action as finished, either in success or failure.
//EndAction can be called from anywhere.
protected override void OnExecute() {
}
//Called once per frame while the action is active.
protected override void OnUpdate() {
if (resolvedVector2.isDefined) {
resolvedVector2.value = agent.GetResolvedDirection();
}
if (resolvedVector3.isDefined) {
resolvedVector3.value = agent.GetResolvedDirection().ToVector3();
}
if (resolvedGravity.isDefined) {
resolvedGravity.value = agent.GetResolvedGravity();
}
if (resolvedSpeed.isDefined) {
resolvedSpeed.value = agent.GetResolvedSpeed();
}
if (resolvedRotation.isDefined) {
resolvedRotation.value = agent.GetResolvedRotation();
}
EndAction(true);
}
//Called when the task is disabled.
protected override void OnStop() {
}
//Called when the task is paused.
protected override void OnPause() {
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 7f47f6f2c7f3ecb4c966db702716b1aa

View File

@@ -29,11 +29,14 @@ namespace Reset.Units {
//This is called once each time the task is enabled. //This is called once each time the task is enabled.
//Call EndAction() to mark the action as finished, either in success or failure. //Call EndAction() to mark the action as finished, either in success or failure.
//EndAction can be called from anywhere. //EndAction can be called from anywhere.
protected override void OnExecute() { protected override void OnExecute(){
agent.SetNewDirection(newDirection.value, relativity.value, absolute.value, relativeTo.value.ToVector2()); // Vector2 outputDir = agent.transform.InverseTransformDirection(newDirection.value).ToVector2();
// outputDir = newDirection.value;
agent.SetNewDirection(newDirection.value.normalized, relativity.value, absolute.value, relativeTo.value.ToVector2());
if (setRawAsWell.value) { if (setRawAsWell.value) {
agent.SetNewRawDirection(newDirection.value, relativity.value, absolute.value, relativeTo.value.ToVector2()); agent.SetNewRawDirection(newDirection.value.normalized, relativity.value, absolute.value, relativeTo.value.ToVector2());
} }
EndAction(true); EndAction(true);

View File

@@ -1,5 +1,6 @@
using NodeCanvas.Framework; using NodeCanvas.Framework;
using ParadoxNotion.Design; using ParadoxNotion.Design;
using Unity.Mathematics.Geometry;
using UnityEngine; using UnityEngine;
namespace Reset.Units { namespace Reset.Units {
@@ -13,6 +14,13 @@ namespace Reset.Units {
[SliderField(0, 1)] [SliderField(0, 1)]
public BBParameter<float> relativity; public BBParameter<float> relativity;
[Tooltip("If using during execute, multiply by delta time")]
[Space(5)] public BBParameter<bool> deltaTime;
[Tooltip("This is only used if the value is set in an Update loop. Set to 0 to remove decay")]
public BBParameter<float> decayRate;
//Use for initialization. This is called only once in the lifetime of the task. //Use for initialization. This is called only once in the lifetime of the task.
//Return null if init was successfull. Return an error string otherwise //Return null if init was successfull. Return an error string otherwise
protected override string OnInit() { protected override string OnInit() {
@@ -23,13 +31,23 @@ namespace Reset.Units {
//Call EndAction() to mark the action as finished, either in success or failure. //Call EndAction() to mark the action as finished, either in success or failure.
//EndAction can be called from anywhere. //EndAction can be called from anywhere.
protected override void OnExecute() { protected override void OnExecute() {
agent.SetNewGravity(newGravity.value, relativity.value, absolute.value);
EndAction(true);
} }
//Called once per frame while the action is active. //Called once per frame while the action is active.
protected override void OnUpdate() { protected override void OnUpdate(){
float finalValue = newGravity.value ;
if (decayRate.value != 0) {
finalValue -= decayRate.value * elapsedTime;
}
if (deltaTime.value) {
finalValue *= Time.deltaTime;
}
agent.SetNewGravity(finalValue, relativity.value, absolute.value);
EndAction(true);
} }
//Called when the task is disabled. //Called when the task is disabled.

View File

@@ -8,14 +8,15 @@ namespace Reset.Units {
[Category("Reset/Movement")] [Category("Reset/Movement")]
[Description("Set a new rotation value for this agent, either additively, absolutely, or relatively.")] [Description("Set a new rotation value for this agent, either additively, absolutely, or relatively.")]
public class SetNewRotation : ActionTask<UnitMovementHandler> { public class SetNewRotation : ActionTask<UnitMovementHandler> {
public BBParameter<Quaternion> newRotation; public BBParameter<Vector3> newRotation;
[Tooltip("Setting absolute to true will cause the resolved movement rotation to snap to the new gravity value. Keeping it false will make it apply additively to the resolved movement rotation. Both options use relativty for linear interpolation.")] [Tooltip("Setting absolute to true will cause the resolved movement rotation to snap to the new gravity value. Keeping it false will make it apply additively to the resolved movement rotation. Both options use relativty for linear interpolation.")]
public BBParameter<bool> absolute; public BBParameter<bool> absolute;
[Tooltip("Higher relativity means more of the new value is used. Value of 1 will set it to the value directly, while .5 will blend halfway between.")] [Tooltip("Higher relativity means more of the new value is used. Value of 1 will set it to the value directly, while .5 will blend halfway between.")]
[SliderField(0, 1)] [SliderField(0, 1)]
public BBParameter<float> relativity; public BBParameter<float> relativity;
public BBParameter<Quaternion> relativeTo; public BBParameter<Vector3> relativeTo;
public BBParameter<bool> relativeToIsDirection;
//Use for initialization. This is called only once in the lifetime of the task. //Use for initialization. This is called only once in the lifetime of the task.
//Return null if init was successfull. Return an error string otherwise //Return null if init was successfull. Return an error string otherwise
@@ -27,7 +28,11 @@ namespace Reset.Units {
//Call EndAction() to mark the action as finished, either in success or failure. //Call EndAction() to mark the action as finished, either in success or failure.
//EndAction can be called from anywhere. //EndAction can be called from anywhere.
protected override void OnExecute() { protected override void OnExecute() {
agent.SetNewRotation(newRotation.value, relativity.value, absolute.value, relativeTo.value); if (relativeToIsDirection.value) {
agent.SetNewRotation(Quaternion.Euler(newRotation.value), relativity.value, absolute.value, Quaternion.Euler(relativeTo.value));
} else {
agent.SetNewRotation(Quaternion.Euler(newRotation.value), relativity.value, absolute.value, Quaternion.LookRotation(relativeTo.value));
}
EndAction(true); EndAction(true);
} }

View File

@@ -25,7 +25,7 @@ namespace Reset.Units {
//Call EndAction() to mark the action as finished, either in success or failure. //Call EndAction() to mark the action as finished, either in success or failure.
//EndAction can be called from anywhere. //EndAction can be called from anywhere.
protected override void OnExecute() { protected override void OnExecute() {
agent.SetNewGravity(newSpeed.value, relativity.value, absolute.value); agent.SetNewSpeed(newSpeed.value, relativity.value, absolute.value);
EndAction(true); EndAction(true);
} }

View File

@@ -78,7 +78,7 @@ public class SettingValue<T> : IResettableSettingValue{
currentSmoothing = Mathf.MoveTowards(currentSmoothing, targetSmoothing, targetEasing * targetEasing * Time.deltaTime); currentSmoothing = Mathf.MoveTowards(currentSmoothing, targetSmoothing, targetEasing * targetEasing * Time.deltaTime);
if (typeof(T) == typeof(float)) { if (typeof(T) == typeof(float)) {
currentValue = (T)(object)Mathf.SmoothDamp((float)(object)currentValue, (float)(object)targetValue, ref refVelFloat, currentSmoothing * currentSmoothing * Time.deltaTime); currentValue = (T)(object)Mathf.SmoothDamp((float)(object)currentValue, (float)(object)targetValue, ref refVelFloat, currentSmoothing * Time.deltaTime);
} }
if (typeof(T) == typeof(Vector2)) { if (typeof(T) == typeof(Vector2)) {
@@ -103,5 +103,6 @@ public class SettingValue<T> : IResettableSettingValue{
defaultValue = targetValue; defaultValue = targetValue;
defaultSmoothing = targetSmoothing; defaultSmoothing = targetSmoothing;
defaultEasing = targetEasing; defaultEasing = targetEasing;
currentSmoothing = targetSmoothing;
} }
} }

View File

@@ -210,14 +210,22 @@ namespace Reset.Units{
} }
} }
public void SetNewDirection(Vector2 value, float relativity, bool absolute, Vector2 relativeTo = default){ // new public void SetNewDirection(Vector2 value, float relativity, bool absolute, Vector2 relativeTo = default, bool relativeToRotation = true){ // new
Vector2 relativeValue = relativeTo + value; Vector2 relativeValue;
if (relativeToRotation){
relativeValue = (Quaternion.LookRotation(relativeTo.ToVector3()) * value.ToVector3()).ToVector2();
} else {
relativeValue = relativeTo + value;
}
if (absolute){ if (absolute){
resolvedMovement.moveDirection.World = Vector2.Lerp(resolvedMovement.moveDirection.World, relativeValue, relativity); resolvedMovement.moveDirection.World = Vector2.Lerp(resolvedMovement.moveDirection.World, relativeValue, relativity);
} else { } else {
resolvedMovement.moveDirection.World = Vector2.Lerp(resolvedMovement.moveDirection.World, resolvedMovement.moveDirection.World + relativeValue, relativity); resolvedMovement.moveDirection.World = Vector2.Lerp(resolvedMovement.moveDirection.World, resolvedMovement.moveDirection.World + relativeValue, relativity);
} }
Debug.Log(resolvedMovement.moveDirection.World);
} }
public void SetNewRawDirection(Vector2 value, float relativity, bool absolute, Vector2 relativeTo = default){ // new public void SetNewRawDirection(Vector2 value, float relativity, bool absolute, Vector2 relativeTo = default){ // new
@@ -251,6 +259,26 @@ namespace Reset.Units{
public void SetSpecifiedRotation(Quaternion inputRotation){ public void SetSpecifiedRotation(Quaternion inputRotation){
specifiedRotation = inputRotation; specifiedRotation = inputRotation;
} }
public Vector2 GetResolvedDirection(){
return resolvedMovement.moveDirection.World;
}
public Vector3 GetResolvedDirectionVector3(){
return resolvedMovement.moveDirection.World.ToVector3();
}
public float GetResolvedSpeed(){
return resolvedMovement.moveSpeed;
}
public float GetResolvedGravity(){
return resolvedMovement.gravity;
}
public Quaternion GetResolvedRotation(){
return resolvedMovement.rotation;
}
[Button("Initialize Settings", ButtonHeight = 30), PropertySpace(10,5 )] [Button("Initialize Settings", ButtonHeight = 30), PropertySpace(10,5 )]
void InitAllSettings(){ void InitAllSettings(){
@@ -289,7 +317,6 @@ namespace Reset.Units{
public void OverwriteDirectionFromInput(Vector2 value, float priority, float speed = Mathf.Infinity){ // Old public void OverwriteDirectionFromInput(Vector2 value, float priority, float speed = Mathf.Infinity){ // Old
Debug.LogError("Using an old movement command! Switch to one of the new alternatives!"); Debug.LogError("Using an old movement command! Switch to one of the new alternatives!");
} }
} }
} }