diff --git a/Assets/Player/Graphs/PlayerLocomotionFSM.asset b/Assets/Player/Graphs/PlayerLocomotionFSM.asset index 83a8d0f..fb2f3ff 100644 --- a/Assets/Player/Graphs/PlayerLocomotionFSM.asset +++ b/Assets/Player/Graphs/PlayerLocomotionFSM.asset @@ -21,7 +21,7 @@ MonoBehaviour: _version: 3.31 _category: _comments: - _translation: {x: 1, y: -175} + _translation: {x: 21, y: -46} _zoomFactor: 0.9967056 _haltSerialization: 0 _externalSerializationFile: {fileID: 0} diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index cdda6e4..41b700c 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -6751,21 +6751,24 @@ MonoBehaviour: _serializedExposedParameters: [] _boundGraphSerialization: '{"type":"NodeCanvas.StateMachines.FSM","nodes":[{"_onEnterList":{"executionMode":1,"actions":[{"valueA":{"_name":"airJumpsRemaining","_targetVariableID":"23f0ddc0-c4e8-462f-a7e0-fdd8e818d08d"},"valueB":{"_value":4},"$type":"NodeCanvas.Tasks.Actions.SetVariable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},{"valueA":{"_name":"airMoveDirection","_targetVariableID":"2fc91db6-09dd-4a1f-9195-426a0c44de31"},"valueB":{"_name":"groundMoveDirection","_targetVariableID":"a2c4fe25-9549-4bdd-8cec-2dbfc4a8856f"},"_isDisabled":true,"$type":"NodeCanvas.Tasks.Actions.SetVariable`1[[UnityEngine.Vector3, - UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}]},"_onUpdateList":{"executionMode":1,"actions":[]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"foldExit":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_name":"Ground - Idle","_position":{"x":279.7396,"y":305.6144},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"0"},{"_onEnterList":{"executionMode":1,"actions":[{"valueA":{"_name":"airJumpsRemaining","_targetVariableID":"23f0ddc0-c4e8-462f-a7e0-fdd8e818d08d"},"Operation":2,"valueB":{"_value":1},"$type":"NodeCanvas.Tasks.Actions.SetInt"}]},"_onUpdateList":{"executionMode":1,"actions":[{"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"2fc91db6-09dd-4a1f-9195-426a0c44de31"},"groundMoveDirection":{"_name":"groundMoveDirection","_targetVariableID":"a2c4fe25-9549-4bdd-8cec-2dbfc4a8856f"},"playerFacingDirection":{"_name":"facingDirection","_targetVariableID":"ff039cd9-e306-4c88-84db-54cbd3708ed5"},"$type":"NodeCanvas.Tasks.Actions.CalculateAirMovement"}]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"foldUpdate":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_name":"Airborn - (Actionable)","_position":{"x":665.0512,"y":-148.5536},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"1"},{"_onEnterList":{"executionMode":1,"actions":[{"jumpStrength":{"_value":18.0},"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"2fc91db6-09dd-4a1f-9195-426a0c44de31"},"playerFacingDirection":{"_name":"facingDirection","_targetVariableID":"ff039cd9-e306-4c88-84db-54cbd3708ed5"},"standStillJumpStrength":{},"jumpPower":{"_name":"jumpPower","_targetVariableID":"9a82efee-e317-423c-ad6e-5ef7e6145396"},"currentVelocityInheritence":{"_value":0.2},"directionalForce":{"_value":{"y":1.0,"z":0.3}},"directionalForceStrength":{"_value":1.0},"$type":"NodeCanvas.Tasks.Actions.AddJump"},{"valueA":{"_name":"gravityPower","_targetVariableID":"2221dc20-d9b3-4781-bd23-0b2038a7ff5e"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_onUpdateList":{"executionMode":1,"actions":[]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_name":"Wall - Climb Jump","_position":{"x":1040.998,"y":-613.6815},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"2"},{"_onEnterList":{"executionMode":1,"actions":[{"jumpStrength":{},"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"2fc91db6-09dd-4a1f-9195-426a0c44de31"},"playerFacingDirection":{"_name":"facingDirection","_targetVariableID":"ff039cd9-e306-4c88-84db-54cbd3708ed5"},"standStillJumpStrength":{},"jumpPower":{},"currentVelocityInheritence":{},"directionalForce":{},"directionalForceStrength":{},"$type":"NodeCanvas.Tasks.Actions.AddJump"},{"valueA":{"_name":"gravityPower","_targetVariableID":"2221dc20-d9b3-4781-bd23-0b2038a7ff5e"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_onUpdateList":{"executionMode":1,"actions":[]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_name":"Wall - Jump","_position":{"x":859.4374,"y":-463.0821},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"3"},{"_onEnterList":{"executionMode":1,"actions":[{"jumpStrength":{"_value":12.0},"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"2fc91db6-09dd-4a1f-9195-426a0c44de31"},"playerFacingDirection":{"_name":"facingDirection","_targetVariableID":"ff039cd9-e306-4c88-84db-54cbd3708ed5"},"standStillJumpStrength":{"_value":1.0},"jumpPower":{"_name":"jumpPower","_targetVariableID":"9a82efee-e317-423c-ad6e-5ef7e6145396"},"currentVelocityInheritence":{"_value":1.0},"directionalForce":{},"directionalForceStrength":{},"$type":"NodeCanvas.Tasks.Actions.AddJump"},{"valueA":{"_name":"gravityPower","_targetVariableID":"2221dc20-d9b3-4781-bd23-0b2038a7ff5e"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_onUpdateList":{"executionMode":1,"actions":[]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_name":"Standard - Jump","_position":{"x":879.2953,"y":92.40906},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"4"},{"_onEnterList":{"executionMode":1,"actions":[]},"_onUpdateList":{"executionMode":1,"actions":[{"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"2fc91db6-09dd-4a1f-9195-426a0c44de31"},"groundMoveDirection":{"_name":"groundMoveDirection","_targetVariableID":"a2c4fe25-9549-4bdd-8cec-2dbfc4a8856f"},"playerFacingDirection":{"_name":"facingDirection","_targetVariableID":"ff039cd9-e306-4c88-84db-54cbd3708ed5"},"$type":"NodeCanvas.Tasks.Actions.CalculateAirMovement"}]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"foldUpdate":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_name":"Airborn","_position":{"x":145.816,"y":-27.25839},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"5"},{"_onEnterList":{"executionMode":1,"actions":[{"jumpStrength":{"_value":10.0},"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"2fc91db6-09dd-4a1f-9195-426a0c44de31"},"playerFacingDirection":{"_name":"facingDirection","_targetVariableID":"ff039cd9-e306-4c88-84db-54cbd3708ed5"},"standStillJumpStrength":{},"jumpPower":{"_name":"jumpPower","_targetVariableID":"9a82efee-e317-423c-ad6e-5ef7e6145396"},"currentVelocityInheritence":{"_value":0.3},"directionalForce":{"_value":{"x":1.0,"z":1.0}},"directionalForceStrength":{"_value":10.0},"$type":"NodeCanvas.Tasks.Actions.AddJump"},{"valueA":{"_name":"gravityPower","_targetVariableID":"2221dc20-d9b3-4781-bd23-0b2038a7ff5e"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_onUpdateList":{"executionMode":1,"actions":[]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_name":"Wall - Jump","_position":{"x":328.7507,"y":-417.6486},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"6"},{"_actionList":{"executionMode":1,"actions":[{"raycastHit":{"_name":"_wallStickHit"},"transform":{},"collider":{},"gameObject":{},"distance":{},"normal":{"_name":"_wallStickHitNormal"},"point":{"_name":"_wallStickHitPoint"},"$type":"NodeCanvas.Tasks.Actions.DecomposeRaycastHit"},{"targetValue":{"_name":"_wallStickHitPoint"},"relativeToSelf":{},"relativeValue":{},"changeInstantly":{},"$type":"NodeCanvas.Tasks.Actions.ChangeAgentTransform"}]},"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_position":{"x":1529.204,"y":150.0244},"$type":"NodeCanvas.StateMachines.ActionState","$id":"7"},{"_onEnterList":{"actions":[{"valueA":{"_name":"airMoveDirection","_targetVariableID":"2fc91db6-09dd-4a1f-9195-426a0c44de31"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetVector3"},{"valueA":{"_name":"jumpPower","_targetVariableID":"9a82efee-e317-423c-ad6e-5ef7e6145396"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_onUpdateList":{"executionMode":1,"actions":[{"valueA":{"_name":"gravityPower","_targetVariableID":"2221dc20-d9b3-4781-bd23-0b2038a7ff5e"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_name":"Stick","_position":{"x":1372.631,"y":333.5441},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"8"},{"_actionList":{"executionMode":1,"actions":[]},"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_position":{"x":1062.345,"y":493.4979},"$type":"NodeCanvas.StateMachines.ActionState","$id":"9"},{"_position":{"x":1792.521,"y":0.5007014},"$type":"NodeCanvas.StateMachines.EmptyState","$id":"10"},{"_actionList":{"executionMode":1,"actions":[{"jumpStrength":{"_value":18.0},"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"2fc91db6-09dd-4a1f-9195-426a0c44de31"},"playerFacingDirection":{"_name":"facingDirection","_targetVariableID":"ff039cd9-e306-4c88-84db-54cbd3708ed5"},"standStillJumpStrength":{},"jumpPower":{"_name":"jumpPower","_targetVariableID":"9a82efee-e317-423c-ad6e-5ef7e6145396"},"currentVelocityInheritence":{"_value":0.2},"directionalForce":{"_value":{"x":0.5,"y":0.5}},"directionalForceStrength":{"_value":1.0},"$type":"NodeCanvas.Tasks.Actions.AddJump"}]},"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_position":{"x":1772.156,"y":-291.6531},"$type":"NodeCanvas.StateMachines.ActionState","$id":"11"},{"_name":"back - to airborne","_position":{"x":1309.379,"y":-234.1178},"$type":"NodeCanvas.StateMachines.EmptyState","$id":"12"},{"_actionList":{"executionMode":1,"actions":[{"jumpStrength":{"_value":18.0},"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"2fc91db6-09dd-4a1f-9195-426a0c44de31"},"playerFacingDirection":{"_name":"facingDirection","_targetVariableID":"ff039cd9-e306-4c88-84db-54cbd3708ed5"},"standStillJumpStrength":{},"jumpPower":{"_name":"jumpPower","_targetVariableID":"9a82efee-e317-423c-ad6e-5ef7e6145396"},"currentVelocityInheritence":{"_value":0.2},"directionalForce":{"_value":{"x":-0.5,"y":0.5}},"directionalForceStrength":{"_value":1.0},"$type":"NodeCanvas.Tasks.Actions.AddJump"}]},"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_position":{"x":1547.682,"y":-182.6647},"$type":"NodeCanvas.StateMachines.ActionState","$id":"13"},{"_actionList":{"executionMode":1,"actions":[{"raycastHit":{"_name":"_wallStickHit"},"transform":{},"collider":{},"gameObject":{},"distance":{},"normal":{"_name":"_wallStickHitNormal"},"point":{"_name":"_wallStickHitPoint"},"$type":"NodeCanvas.Tasks.Actions.DecomposeRaycastHit"},{"targetValue":{"_name":"_wallStickHitPoint"},"relativeToSelf":{},"relativeValue":{},"changeInstantly":{},"$type":"NodeCanvas.Tasks.Actions.ChangeAgentTransform"}]},"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_position":{"x":1182.539,"y":147.9827},"$type":"NodeCanvas.StateMachines.ActionState","$id":"14"},{"_subFSM":{"_value":1},"_variablesMap":[{"_targetSubGraphVariableID":"16ae5ce4-097a-4c21-94a5-2c5d9ce73eb6","_canRead":true,"_canWrite":true,"_type":"UnityEngine.Vector3","_name":"groundMoveDirection","_targetVariableID":"a2c4fe25-9549-4bdd-8cec-2dbfc4a8856f"},{"_targetSubGraphVariableID":"d888730f-97df-4288-bb99-1f6c8a34a7c5","_canRead":true,"_canWrite":true,"_type":"System.Single","_name":"rotationSpeed","_targetVariableID":"3a7d1c7c-8fb6-4a99-b25a-b434b62d4611"}],"_position":{"x":-257.669,"y":558.3375},"$type":"NodeCanvas.StateMachines.ConcurrentSubFSM"},{"_conditionList":{"conditions":[{"_invert":true,"$type":"NodeCanvas.Tasks.Conditions.DebugCondition"}]},"_actionList":{"executionMode":1,"actions":[{"groundMoveDirection":{"_name":"groundMoveDirection","_targetVariableID":"a2c4fe25-9549-4bdd-8cec-2dbfc4a8856f"},"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"2fc91db6-09dd-4a1f-9195-426a0c44de31"},"gravityAcceleration":{"_value":1.0},"gravityMax":{"_value":8.0},"jumpPower":{"_name":"jumpPower","_targetVariableID":"9a82efee-e317-423c-ad6e-5ef7e6145396"},"jumpPowerDecay":{"_value":2.0},"playerFacingDirection":{"_name":"facingDirection","_targetVariableID":"ff039cd9-e306-4c88-84db-54cbd3708ed5"},"rotationSpeed":{"_name":"rotationSpeed","_targetVariableID":"3a7d1c7c-8fb6-4a99-b25a-b434b62d4611"},"rotationSmoothing":{"_value":1.0},"gravityPower":{"_name":"gravityPower","_targetVariableID":"2221dc20-d9b3-4781-bd23-0b2038a7ff5e"},"$type":"NodeCanvas.Tasks.Actions.ProcessMovement"}]},"_position":{"x":-260.1776,"y":405.5469},"$type":"NodeCanvas.StateMachines.OnFSMEnter"},{"_subTree":{"_value":2},"_position":{"x":-43.41095,"y":552.2315},"$type":"NodeCanvas.StateMachines.ConcurrentSubTree"},{"_subTree":{"_value":3},"_tag":"","_position":{"x":451.3007,"y":22.14104},"_comment":"","$type":"NodeCanvas.StateMachines.ConcurrentSubTree"},{"_actionList":{"executionMode":1,"actions":[]},"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_position":{"x":1214.994,"y":519.0428},"$type":"NodeCanvas.StateMachines.ActionState"}],"connections":[{"_condition":{"valueA":{"_name":"isGrounded","_targetVariableID":"619300a4-be8b-4ad4-ba2a-978468094ba2"},"valueB":{},"$type":"NodeCanvas.Tasks.Conditions.CheckBoolean"},"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"actionName":{"_value":"Jump"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"4"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"conditions":[{"eventName":{"_value":"ForwardRay"},"value":{"_value":true},"$type":"NodeCanvas.Tasks.Conditions.CheckEventValue`1[[System.Boolean, - mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},{"actionName":{"_value":"Jump"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"}],"$type":"NodeCanvas.Framework.ConditionList"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"2"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"conditions":[{"actionName":{"_value":"Jump"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},{"eventName":{"_value":"RightRay"},"$type":"NodeCanvas.Tasks.Conditions.CheckEvent"}],"$type":"NodeCanvas.Framework.ConditionList"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"3"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"actionName":{"_value":"Jump"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"4"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"valueA":{"_name":"airJumpsRemaining","_targetVariableID":"23f0ddc0-c4e8-462f-a7e0-fdd8e818d08d"},"valueB":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInt"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"5"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"valueA":{"_name":"isGrounded","_targetVariableID":"619300a4-be8b-4ad4-ba2a-978468094ba2"},"valueB":{"_value":true},"$type":"NodeCanvas.Tasks.Conditions.CheckBoolean"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"0"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"conditions":[{"actionName":{"_value":"Jump"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},{"eventName":{"_value":"LeftRay"},"$type":"NodeCanvas.Tasks.Conditions.CheckEvent"}],"$type":"NodeCanvas.Framework.ConditionList"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"6"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"conditions":[{"observerLabel":{"_value":"left-wallstick"},"outputHitTo":{"_name":"_wallStickHit"},"$type":"NodeCanvas.Tasks.Conditions.CheckEnvironmentObserver"},{"actionName":{"_value":"Stick"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"}],"$type":"NodeCanvas.Framework.ConditionList"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"7"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"conditions":[{"observerLabel":{"_value":"right-wallstick"},"outputHitTo":{"_name":"_wallStickHit2"},"$type":"NodeCanvas.Tasks.Conditions.CheckEnvironmentObserver"},{"actionName":{"_value":"Stick"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"}],"$type":"NodeCanvas.Framework.ConditionList"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"14"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"2"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"3"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"4"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"valueA":{"_name":"isGrounded","_targetVariableID":"619300a4-be8b-4ad4-ba2a-978468094ba2"},"valueB":{"_value":true},"$type":"NodeCanvas.Tasks.Conditions.CheckBoolean"},"_sourceNode":{"$ref":"5"},"_targetNode":{"$ref":"0"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"6"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"7"},"_targetNode":{"$ref":"8"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"timeout":{"_value":1.0},"$type":"NodeCanvas.Tasks.Conditions.Timeout"},"_sourceNode":{"$ref":"8"},"_targetNode":{"$ref":"9"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"actionName":{"_value":"Jump"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},"_sourceNode":{"$ref":"8"},"_targetNode":{"$ref":"10"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"9"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"10"},"_targetNode":{"$ref":"11"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"10"},"_targetNode":{"$ref":"13"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"11"},"_targetNode":{"$ref":"12"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"12"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"13"},"_targetNode":{"$ref":"12"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"14"},"_targetNode":{"$ref":"8"},"$type":"NodeCanvas.StateMachines.FSMConnection"}],"canvasGroups":[],"localBlackboard":{"_variables":{"isGrounded":{"_propertyPath":"UnityEngine.CharacterController.isGrounded","_name":"isGrounded","_id":"619300a4-be8b-4ad4-ba2a-978468094ba2","$type":"NodeCanvas.Framework.Variable`1[[System.Boolean, + UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}]},"_onUpdateList":{"executionMode":1,"actions":[]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"foldExit":true,"_color":{"r":1.0,"g":1.0,"b":1.0,"a":1.0},"_name":"Grounded","_position":{"x":279.7396,"y":305.6144},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"0"},{"_onEnterList":{"executionMode":1,"actions":[{"valueA":{"_name":"airJumpsRemaining","_targetVariableID":"23f0ddc0-c4e8-462f-a7e0-fdd8e818d08d"},"Operation":2,"valueB":{"_value":1},"$type":"NodeCanvas.Tasks.Actions.SetInt"}]},"_onUpdateList":{"executionMode":1,"actions":[{"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"2fc91db6-09dd-4a1f-9195-426a0c44de31"},"groundMoveDirection":{"_name":"groundMoveDirection","_targetVariableID":"a2c4fe25-9549-4bdd-8cec-2dbfc4a8856f"},"playerFacingDirection":{"_name":"facingDirection","_targetVariableID":"ff039cd9-e306-4c88-84db-54cbd3708ed5"},"$type":"NodeCanvas.Tasks.Actions.CalculateAirMovement"}]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"foldUpdate":true,"_color":{"r":0.4980392,"g":1.0,"b":0.9801429,"a":1.0},"_name":"Airborn + (Actionable)","_position":{"x":665.0512,"y":-148.5536},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"1"},{"_onEnterList":{"executionMode":1,"actions":[{"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"2fc91db6-09dd-4a1f-9195-426a0c44de31"},"jumpPower":{"_name":"jumpPower","_targetVariableID":"9a82efee-e317-423c-ad6e-5ef7e6145396"},"jumpStrength":{"_value":18.0},"standStillJumpStrength":{},"currentVelocityInheritence":{"_value":0.2},"directionalForce":{"_value":{"y":1.0,"z":0.3}},"directionalForceStrength":{"_value":1.0},"$type":"NodeCanvas.Tasks.Actions.AddJump"},{"valueA":{"_name":"gravityPower","_targetVariableID":"2221dc20-d9b3-4781-bd23-0b2038a7ff5e"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_onUpdateList":{"executionMode":1,"actions":[]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"_color":{"r":0.4117647,"g":0.945098,"b":0.254902,"a":1.0},"_name":"Wall + Climb Jump","_position":{"x":927.3151,"y":-465.0193},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"2"},{"_onEnterList":{"executionMode":1,"actions":[{"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"2fc91db6-09dd-4a1f-9195-426a0c44de31"},"jumpPower":{},"jumpStrength":{},"standStillJumpStrength":{},"currentVelocityInheritence":{},"directionalForce":{},"directionalForceStrength":{},"$type":"NodeCanvas.Tasks.Actions.AddJump"},{"valueA":{"_name":"gravityPower","_targetVariableID":"2221dc20-d9b3-4781-bd23-0b2038a7ff5e"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_onUpdateList":{"executionMode":1,"actions":[]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"_color":{"r":0.4117647,"g":0.945098,"b":0.254902,"a":1.0},"_name":"Wall + Jump","_position":{"x":445.4374,"y":-553.0821},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"3"},{"_onEnterList":{"executionMode":1,"actions":[{"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"2fc91db6-09dd-4a1f-9195-426a0c44de31"},"jumpPower":{"_name":"jumpPower","_targetVariableID":"9a82efee-e317-423c-ad6e-5ef7e6145396"},"jumpStrength":{"_value":12.0},"standStillJumpStrength":{"_value":1.0},"currentVelocityInheritence":{"_value":1.0},"directionalForce":{},"directionalForceStrength":{},"$type":"NodeCanvas.Tasks.Actions.AddJump"},{"valueA":{"_name":"gravityPower","_targetVariableID":"2221dc20-d9b3-4781-bd23-0b2038a7ff5e"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_onUpdateList":{"executionMode":1,"actions":[]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"_color":{"r":0.4117647,"g":0.945098,"b":0.254902,"a":1.0},"_name":"Standard + Jump","_position":{"x":900.8845,"y":90.12998},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"4"},{"_onEnterList":{"executionMode":1,"actions":[]},"_onUpdateList":{"executionMode":1,"actions":[{"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"2fc91db6-09dd-4a1f-9195-426a0c44de31"},"groundMoveDirection":{"_name":"groundMoveDirection","_targetVariableID":"a2c4fe25-9549-4bdd-8cec-2dbfc4a8856f"},"playerFacingDirection":{"_name":"facingDirection","_targetVariableID":"ff039cd9-e306-4c88-84db-54cbd3708ed5"},"$type":"NodeCanvas.Tasks.Actions.CalculateAirMovement"}]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"foldUpdate":true,"_color":{"r":0.5019608,"g":1.0,"b":0.9803922,"a":1.0},"_name":"Airborn","_position":{"x":93.81598,"y":-44.25836},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"5"},{"_actionList":{"actions":[{"raycastHit":{"_name":"_wallStickHit"},"transform":{},"collider":{},"gameObject":{},"distance":{},"normal":{"_name":"_wallStickHitNormal"},"point":{"_name":"_wallStickHitPoint"},"$type":"NodeCanvas.Tasks.Actions.DecomposeRaycastHit"},{"targetProperty":1,"forcePositionChange":{},"targetValue":{"_name":"_wallStickHitPoint"},"relativeToSelf":{},"relativeValue":{"_value":{"y":-45.0}},"changeInstantly":{"_value":true},"smoothing":{"_value":0.5},"$type":"NodeCanvas.Tasks.Actions.ChangeAgentTransform"}]},"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_name":"Left + Side Stick","_position":{"x":1130.783,"y":147.7389},"$type":"NodeCanvas.StateMachines.ActionState","$id":"6"},{"_onEnterList":{"actions":[{"valueA":{"_name":"airMoveDirection","_targetVariableID":"2fc91db6-09dd-4a1f-9195-426a0c44de31"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetVector3"},{"valueA":{"_name":"jumpPower","_targetVariableID":"9a82efee-e317-423c-ad6e-5ef7e6145396"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_onUpdateList":{"executionMode":1,"actions":[{"valueA":{"_name":"gravityPower","_targetVariableID":"2221dc20-d9b3-4781-bd23-0b2038a7ff5e"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetFloat"},{"forcePositionChange":{},"targetValue":{"_value":{"y":-1.0}},"relativeToSelf":{"_value":true},"relativeValue":{},"changeInstantly":{},"smoothing":{"_value":1.0},"$type":"NodeCanvas.Tasks.Actions.ChangeAgentTransform"}]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"foldUpdate":true,"_color":{"r":0.4980392,"g":1.0,"b":0.9803922,"a":1.0},"_name":"Wall + Stick","_position":{"x":1374.939,"y":326.3062},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"7"},{"_onEnterList":{"executionMode":1,"actions":[]},"_onUpdateList":{"executionMode":1,"actions":[]},"_onExitList":{"executionMode":1,"actions":[]},"foldUpdate":true,"_color":{"r":0.4980392,"g":1.0,"b":0.9803922,"a":1.0},"_name":"Wall + Slide","_position":{"x":1027.8,"y":455.0581},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"8"},{"_position":{"x":1810.521,"y":0.5006714},"$type":"NodeCanvas.StateMachines.EmptyState","$id":"9"},{"_actionList":{"executionMode":1,"actions":[{"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"2fc91db6-09dd-4a1f-9195-426a0c44de31"},"jumpPower":{"_name":"jumpPower","_targetVariableID":"9a82efee-e317-423c-ad6e-5ef7e6145396"},"jumpStrength":{"_value":18.0},"standStillJumpStrength":{},"currentVelocityInheritence":{"_value":0.2},"directionalForce":{"_value":{"x":0.5,"y":0.5}},"directionalForceStrength":{"_value":1.0},"$type":"NodeCanvas.Tasks.Actions.AddJump"}]},"_color":{"r":0.4117647,"g":0.945098,"b":0.254902,"a":1.0},"_position":{"x":1772.156,"y":-291.6531},"$type":"NodeCanvas.StateMachines.ActionState","$id":"10"},{"_name":"back + to airborne","_position":{"x":1309.379,"y":-234.1178},"$type":"NodeCanvas.StateMachines.EmptyState","$id":"11"},{"_actionList":{"executionMode":1,"actions":[{"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"2fc91db6-09dd-4a1f-9195-426a0c44de31"},"jumpPower":{"_name":"jumpPower","_targetVariableID":"9a82efee-e317-423c-ad6e-5ef7e6145396"},"jumpStrength":{"_value":18.0},"standStillJumpStrength":{},"currentVelocityInheritence":{"_value":0.2},"directionalForce":{"_value":{"x":-0.5,"y":0.5}},"directionalForceStrength":{"_value":1.0},"$type":"NodeCanvas.Tasks.Actions.AddJump"}]},"_color":{"r":0.4117647,"g":0.945098,"b":0.254902,"a":1.0},"_position":{"x":1547.682,"y":-182.6647},"$type":"NodeCanvas.StateMachines.ActionState","$id":"12"},{"_actionList":{"actions":[{"raycastHit":{"_name":"_wallStickHit"},"transform":{},"collider":{},"gameObject":{},"distance":{},"normal":{"_name":"_wallStickHitNormal"},"point":{"_name":"_wallStickHitPoint"},"$type":"NodeCanvas.Tasks.Actions.DecomposeRaycastHit"},{"forcePositionChange":{},"targetValue":{"_name":"_wallStickHitPoint"},"relativeToSelf":{},"relativeValue":{},"changeInstantly":{"_value":true},"smoothing":{"_value":0.5},"_isDisabled":true,"$type":"NodeCanvas.Tasks.Actions.ChangeAgentTransform"},{"targetProperty":1,"forcePositionChange":{},"targetValue":{"_name":"_wallStickHitPoint"},"relativeToSelf":{},"relativeValue":{"_value":{"y":45.0}},"changeInstantly":{"_value":true},"smoothing":{"_value":0.5},"$type":"NodeCanvas.Tasks.Actions.ChangeAgentTransform"}]},"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_name":"Right + Side Stick","_position":{"x":1529.204,"y":150.0244},"$type":"NodeCanvas.StateMachines.ActionState","$id":"13"},{"_onEnterList":{"executionMode":1,"actions":[{"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"2fc91db6-09dd-4a1f-9195-426a0c44de31"},"jumpPower":{"_name":"jumpPower","_targetVariableID":"9a82efee-e317-423c-ad6e-5ef7e6145396"},"jumpStrength":{"_value":10.0},"standStillJumpStrength":{},"currentVelocityInheritence":{"_value":0.3},"directionalForce":{"_value":{"x":1.0,"z":1.0}},"directionalForceStrength":{"_value":10.0},"$type":"NodeCanvas.Tasks.Actions.AddJump"},{"valueA":{"_name":"gravityPower","_targetVariableID":"2221dc20-d9b3-4781-bd23-0b2038a7ff5e"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_onUpdateList":{"executionMode":1,"actions":[]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"_color":{"r":0.4132327,"g":0.945098,"b":0.254902,"a":1.0},"_name":"Wall + Jump","_position":{"x":295.7507,"y":-397.6486},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"14"},{"_subFSM":{"_value":1},"_variablesMap":[{"_targetSubGraphVariableID":"16ae5ce4-097a-4c21-94a5-2c5d9ce73eb6","_canRead":true,"_canWrite":true,"_type":"UnityEngine.Vector3","_name":"groundMoveDirection","_targetVariableID":"a2c4fe25-9549-4bdd-8cec-2dbfc4a8856f"},{"_targetSubGraphVariableID":"d888730f-97df-4288-bb99-1f6c8a34a7c5","_canRead":true,"_canWrite":true,"_type":"System.Single","_name":"rotationSpeed","_targetVariableID":"3a7d1c7c-8fb6-4a99-b25a-b434b62d4611"}],"_position":{"x":81.68353,"y":697.7145},"$type":"NodeCanvas.StateMachines.ConcurrentSubFSM"},{"_conditionList":{"conditions":[{"_invert":true,"$type":"NodeCanvas.Tasks.Conditions.DebugCondition"}]},"_actionList":{"executionMode":1,"actions":[{"groundMoveDirection":{"_name":"groundMoveDirection","_targetVariableID":"a2c4fe25-9549-4bdd-8cec-2dbfc4a8856f"},"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"2fc91db6-09dd-4a1f-9195-426a0c44de31"},"gravityAcceleration":{"_value":1.0},"gravityMax":{"_value":8.0},"jumpPower":{"_name":"jumpPower","_targetVariableID":"9a82efee-e317-423c-ad6e-5ef7e6145396"},"jumpPowerDecay":{"_value":2.0},"playerFacingDirection":{"_name":"facingDirection","_targetVariableID":"ff039cd9-e306-4c88-84db-54cbd3708ed5"},"rotationSpeed":{"_name":"rotationSpeed","_targetVariableID":"3a7d1c7c-8fb6-4a99-b25a-b434b62d4611"},"rotationSmoothing":{"_value":1.0},"gravityPower":{"_name":"gravityPower","_targetVariableID":"2221dc20-d9b3-4781-bd23-0b2038a7ff5e"},"$type":"NodeCanvas.Tasks.Actions.ProcessMovement"}]},"_position":{"x":79.17493,"y":544.9238},"$type":"NodeCanvas.StateMachines.OnFSMEnter"},{"_subTree":{"_value":2},"_position":{"x":295.9416,"y":691.6085},"$type":"NodeCanvas.StateMachines.ConcurrentSubTree"},{"_subTree":{"_value":3},"_tag":"","_position":{"x":443.3007,"y":53.14105},"_comment":"","$type":"NodeCanvas.StateMachines.ConcurrentSubTree"}],"connections":[{"_condition":{"valueA":{"_name":"isGrounded","_targetVariableID":"619300a4-be8b-4ad4-ba2a-978468094ba2"},"valueB":{},"$type":"NodeCanvas.Tasks.Conditions.CheckBoolean"},"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"actionName":{"_value":"Jump"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"4"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"conditions":[{"eventName":{"_value":"ForwardRay"},"value":{"_value":true},"$type":"NodeCanvas.Tasks.Conditions.CheckEventValue`1[[System.Boolean, + mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},{"actionName":{"_value":"Jump"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"}],"$type":"NodeCanvas.Framework.ConditionList"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"2"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"conditions":[{"actionName":{"_value":"Jump"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},{"eventName":{"_value":"RightRay"},"$type":"NodeCanvas.Tasks.Conditions.CheckEvent"}],"$type":"NodeCanvas.Framework.ConditionList"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"3"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"actionName":{"_value":"Jump"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"4"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"valueA":{"_name":"airJumpsRemaining","_targetVariableID":"23f0ddc0-c4e8-462f-a7e0-fdd8e818d08d"},"valueB":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInt"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"5"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"valueA":{"_name":"isGrounded","_targetVariableID":"619300a4-be8b-4ad4-ba2a-978468094ba2"},"valueB":{"_value":true},"$type":"NodeCanvas.Tasks.Conditions.CheckBoolean"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"0"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"conditions":[{"actionName":{"_value":"Jump"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},{"eventName":{"_value":"LeftRay"},"$type":"NodeCanvas.Tasks.Conditions.CheckEvent"}],"$type":"NodeCanvas.Framework.ConditionList"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"14"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"conditions":[{"observerLabel":{"_value":"left-wallstick"},"outputHitTo":{"_name":"_wallStickHit"},"$type":"NodeCanvas.Tasks.Conditions.CheckEnvironmentObserver"},{"actionName":{"_value":"Stick"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"}],"$type":"NodeCanvas.Framework.ConditionList"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"13"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"conditions":[{"observerLabel":{"_value":"right-wallstick"},"outputHitTo":{"_name":"_wallStickHit"},"$type":"NodeCanvas.Tasks.Conditions.CheckEnvironmentObserver"},{"actionName":{"_value":"Stick"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"}],"$type":"NodeCanvas.Framework.ConditionList"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"6"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"2"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"3"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"4"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"valueA":{"_name":"isGrounded","_targetVariableID":"619300a4-be8b-4ad4-ba2a-978468094ba2"},"valueB":{"_value":true},"$type":"NodeCanvas.Tasks.Conditions.CheckBoolean"},"_sourceNode":{"$ref":"5"},"_targetNode":{"$ref":"0"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"conditions":[{"observerLabel":{"_value":"right-wallstick"},"outputHitTo":{"_name":"_wallStickHit"},"$type":"NodeCanvas.Tasks.Conditions.CheckEnvironmentObserver"},{"actionName":{"_value":"Stick"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"}],"$type":"NodeCanvas.Framework.ConditionList"},"_sourceNode":{"$ref":"5"},"_targetNode":{"$ref":"6"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"conditions":[{"observerLabel":{"_value":"left-wallstick"},"outputHitTo":{"_name":"_wallStickHit"},"$type":"NodeCanvas.Tasks.Conditions.CheckEnvironmentObserver"},{"actionName":{"_value":"Stick"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"}],"$type":"NodeCanvas.Framework.ConditionList"},"_sourceNode":{"$ref":"5"},"_targetNode":{"$ref":"13"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"6"},"_targetNode":{"$ref":"7"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"timeout":{"_value":1.0},"$type":"NodeCanvas.Tasks.Conditions.Timeout"},"_sourceNode":{"$ref":"7"},"_targetNode":{"$ref":"8"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"actionName":{"_value":"Jump"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},"_sourceNode":{"$ref":"7"},"_targetNode":{"$ref":"9"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"checkMode":1,"conditions":[{"timeout":{"_value":2.0},"$type":"NodeCanvas.Tasks.Conditions.Timeout"},{"valueA":{"_name":"isGrounded","_targetVariableID":"09b3259f-8b50-439a-ab86-ea3d8a4916f1"},"valueB":{"_value":true},"_invert":true,"$type":"NodeCanvas.Tasks.Conditions.CheckBoolean"}],"$type":"NodeCanvas.Framework.ConditionList"},"_sourceNode":{"$ref":"8"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"9"},"_targetNode":{"$ref":"10"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"9"},"_targetNode":{"$ref":"12"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"10"},"_targetNode":{"$ref":"11"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"11"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"12"},"_targetNode":{"$ref":"11"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"13"},"_targetNode":{"$ref":"7"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"14"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"}],"canvasGroups":[],"localBlackboard":{"_variables":{"isGrounded":{"_propertyPath":"UnityEngine.CharacterController.isGrounded","_name":"isGrounded","_id":"619300a4-be8b-4ad4-ba2a-978468094ba2","$type":"NodeCanvas.Framework.Variable`1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"forwardRay":{"_propertyPath":"PlayerMovement.forwardRay","_name":"forwardRay","_id":"a2506ca5-1b47-4820-9921-3ff4ecc18564","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.RaycastHit, UnityEngine.PhysicsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},"airJumpsRemaining":{"_name":"airJumpsRemaining","_id":"23f0ddc0-c4e8-462f-a7e0-fdd8e818d08d","$type":"NodeCanvas.Framework.Variable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"rotationSpeed":{"_value":0.5,"_name":"rotationSpeed","_id":"3a7d1c7c-8fb6-4a99-b25a-b434b62d4611","$type":"NodeCanvas.Framework.Variable`1[[System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"jumpPower":{"_name":"jumpPower","_id":"9a82efee-e317-423c-ad6e-5ef7e6145396","$type":"NodeCanvas.Framework.Variable`1[[System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"gravityPower":{"_name":"gravityPower","_id":"2221dc20-d9b3-4781-bd23-0b2038a7ff5e","$type":"NodeCanvas.Framework.Variable`1[[System.Single, - mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"facingDirection":{"_value":2,"_name":"facingDirection","_id":"ff039cd9-e306-4c88-84db-54cbd3708ed5","$type":"NodeCanvas.Framework.Variable`1[[Reset.Player.Movement.PlayerFacingDirection, + mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"facingDirection":{"_value":1,"_name":"facingDirection","_id":"ff039cd9-e306-4c88-84db-54cbd3708ed5","$type":"NodeCanvas.Framework.Variable`1[[Reset.Player.Movement.PlayerFacingDirection, Core, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}}}}' _boundGraphObjectReferences: - {fileID: 0} @@ -6776,8 +6779,8 @@ MonoBehaviour: _version: 3.31 _category: _comments: - _translation: {x: -481, y: 462} - _zoomFactor: 0.89137596 + _translation: {x: 458, y: 159} + _zoomFactor: 1 _firstActivation: 0 _enableAction: 0 _disableAction: 0 @@ -6825,23 +6828,53 @@ MonoBehaviour: m_EditorClassIdentifier: observers: - label: left-wallstick - castType: 0 + castType: 4 active: 0 - length: 1.33 - direction: {x: 1, y: 0, z: 1} - offset: {x: 0, y: 0, z: 0} - width: 0.56 - size: {x: 0.71, y: 0.83, z: 1.42} - rotation: {x: 0, y: 0, z: 0} + length: 1.23 + direction: {x: -1.18, y: 0, z: 0.95} + offset: {x: 0.57, y: 1.28, z: -0.38} ignoreLayers: serializedVersion: 2 - m_Bits: 63 - children: [] + m_Bits: 62 + width: 1.38 + size: {x: 1.27, y: 1.5, z: 0.61} + rotation: {x: 0, y: 0, z: 0} overlapHits: [] drawLabel: 0 + labelTextLocation: 0 + labelSize: 0 labelLocationOffset: {x: 0, y: 0, z: 0} labelRotationOffset: {x: 0, y: 0, z: 0} - labelLocation: 0 + drawHitName: 0 + hitTextLocation: 0 + hitTextSize: 0 + hitLocationOffset: {x: 0, y: 0, z: 0} + hitRotationOffset: {x: 0, y: 0, z: 0} + children: [] + - label: right-wallstick + castType: 4 + active: 0 + length: 1.23 + direction: {x: 1.18, y: 0, z: 0.95} + offset: {x: -0.57, y: 1.28, z: -0.38} + ignoreLayers: + serializedVersion: 2 + m_Bits: 62 + width: 1.38 + size: {x: 1.27, y: 1.5, z: 0.61} + rotation: {x: 0, y: 0, z: 0} + overlapHits: [] + drawLabel: 0 + labelTextLocation: 0 + labelSize: 0 + labelLocationOffset: {x: 0, y: 0, z: 0} + labelRotationOffset: {x: 0, y: 0, z: 0} + drawHitName: 0 + hitTextLocation: 0 + hitTextSize: 0 + hitLocationOffset: {x: 0, y: 0, z: 0} + hitRotationOffset: {x: 0, y: 0, z: 0} + children: [] references: version: 2 RefIds: [] diff --git a/Assets/Scripts/Core/Graph Tasks/CheckEnvironmentObserver.cs b/Assets/Scripts/Core/Graph Tasks/CheckEnvironmentObserver.cs index 33c3b17..bb41faf 100644 --- a/Assets/Scripts/Core/Graph Tasks/CheckEnvironmentObserver.cs +++ b/Assets/Scripts/Core/Graph Tasks/CheckEnvironmentObserver.cs @@ -9,6 +9,7 @@ namespace NodeCanvas.Tasks.Conditions { public BBParameter observerLabel; public BBParameter outputHitTo; + //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(){ diff --git a/Assets/Scripts/Player/PlayerEnvironmentManager.cs b/Assets/Scripts/Player/PlayerEnvironmentManager.cs index dfc45a1..073c818 100644 --- a/Assets/Scripts/Player/PlayerEnvironmentManager.cs +++ b/Assets/Scripts/Player/PlayerEnvironmentManager.cs @@ -9,9 +9,6 @@ using UnityEngine.Serialization; [Serializable] public class EnvironmentObserver{ - // TODO: Clean this ugly shit up. Custom inspector with Odin plz. - public string label; - enum LabelDrawingLocation{ PlayerOffset, HitLocation, @@ -25,11 +22,13 @@ public class EnvironmentObserver{ BoxCast, SphereCast } + + [PropertySpace(0, 5), LabelWidth(60)] + public string label; + [PropertySpace(0, 10), LabelWidth(60)] + public CastType castType; - // [BoxGroup("Settings")] - [ShowInInspector, SerializeField] public CastType castType; - - [Button(ButtonSizes.Large), GUIColor("@GetObserverStatusColorStatic(active, hit)")] + [Button(ButtonSizes.Large), GUIColor("@GetObserverStatusColorStatic(active, hit)"), PropertyOrder(-1), PropertySpace(5, 5)] public void Active(){ active = !active; } @@ -38,46 +37,44 @@ public class EnvironmentObserver{ public bool active; // Parameters for Cast cast types - [BoxGroup("Settings")] - public float length; - [BoxGroup("Settings")] - public Vector3 direction; - [BoxGroup("Settings")] - public Vector3 offset; - - [ShowIfGroup("Settings/Casts3D", VisibleIf = "@castType == CastType.Ray || castType == CastType.BoxCast || castType == CastType.SphereCast")] - [BoxGroup("Settings/Casts3D")] - public float width; + [FoldoutGroup("Settings")] public float length; + [FoldoutGroup("Settings")] public Vector3 direction; + [FoldoutGroup("Settings")] public Vector3 offset; + [PropertySpace(0, 5), FoldoutGroup("Settings")] public LayerMask ignoreLayers = ~0; - // Parameters for Overlap cast types - [BoxGroup("Settings/Overlaps")] - public Vector3 size; + [ShowIfGroup("Settings/CastsOnly", VisibleIf = "@castType == CastType.SphereCast || castType == CastType.SphereOverlap")] + [FoldoutGroup("Settings")] public float width; - [PropertyTooltip( - "Only use rotation when an observers direction alone can't (for whatever reason) fully be expressed without specifying a rotation.")] - [ShowIfGroup("Settings/Casts3D")] - [BoxGroup("Settings/Casts3D")] + // Parameters for Overlap cast types + [ShowIfGroup("Settings/3DOnly", VisibleIf = "@castType == CastType.BoxCast && castType != CastType.BoxOverlap")] [FoldoutGroup("Settings")] + public Vector3 size; + + [ShowIfGroup("Settings/3DOnly")] public Vector3 rotation; - [BoxGroup("Settings")] - public LayerMask ignoreLayers = ~0; - + [HideInInspector] public RaycastHit hit; - [SerializeReference] - public List children; - [HideInInspector] public Collider[] overlapHits; - - public bool drawLabel; - public Vector3 labelLocationOffset; - public Vector3 labelRotationOffset; - [ShowInInspector, SerializeField] - LabelDrawingLocation labelLocation; - + [FoldoutGroup("Text")] + [BoxGroup("Text/Label")] public bool drawLabel; + [ShowInInspector, SerializeField] [BoxGroup("Text/Label")] LabelDrawingLocation labelTextLocation; + [BoxGroup("Text/Label")] public float labelSize; + [BoxGroup("Text/Label")] public Vector3 labelLocationOffset; + [BoxGroup("Text/Label")] public Vector3 labelRotationOffset; + + [BoxGroup("Text/Hit")] public bool drawHitName; + [ShowInInspector, SerializeField] [BoxGroup("Text/Hit")] LabelDrawingLocation hitTextLocation; + [BoxGroup("Text/Hit")] public float hitTextSize; + [BoxGroup("Text/Hit")] public Vector3 hitLocationOffset; + [BoxGroup("Text/Hit")] public Vector3 hitRotationOffset; + + [SerializeReference, PropertySpace(5, 5)] + public List children; + // NOTE: I had a ref for a RaycastHit here that would correspond to hit but idk if it's needed. public bool Evaluate(GameObject player){ if (active) { @@ -86,7 +83,7 @@ public class EnvironmentObserver{ // Set some of the variables used later during casting Vector3 relativeStart = player.transform.position + offset; - Vector3 relativeStartWithRotation = player.transform.position + player.transform.rotation * (offset) ; + Vector3 relativeStartWithRotation = player.transform.position + player.transform.rotation * offset ; switch (castType) { case CastType.Ray: @@ -105,11 +102,21 @@ public class EnvironmentObserver{ break; case CastType.BoxCast: // TODO: Make this not an if statement. Check that it works with NodeCanvas first - if (Physics.BoxCast(relativeStartWithRotation, Vector3.one * (width / 2f), (player.transform.rotation * Quaternion.Euler(rotation) * direction), - out hit, Quaternion.LookRotation(direction) * Quaternion.Euler(rotation), length, ignoreLayers) - ); + if (Physics.BoxCast(relativeStartWithRotation, size / 2f, + player.transform.rotation * Quaternion.Euler(rotation) * direction, + out hit, player.transform.rotation * Quaternion.Euler(rotation), length, + ignoreLayers) + ) { + }; break; case CastType.SphereCast: + // TODO: Make this not an if statement. Check that it works with NodeCanvas first + if (Physics.SphereCast(relativeStartWithRotation, width / 2f, + player.transform.rotation * Quaternion.Euler(rotation) * direction, + out hit, length, + ignoreLayers) + ) { + }; break; } @@ -122,29 +129,21 @@ public class EnvironmentObserver{ public void DrawObserverGizmo(GameObject player){ Vector3 relativeStart = player.transform.position + offset; - Vector3 relativeStartWithRotation = player.transform.position + player.transform.rotation * (offset) ; + Vector3 relativeStartWithRotation = player.transform.position + player.transform.rotation * (offset); + + // Setup the variables for boxcast, spherecast, etc + // Create an offset start point for the center of the wirebox, since gizmos are drawn with their pivot in the center. + Vector3 offsetWithRotationAndLength = (Quaternion.LookRotation(direction) * Quaternion.Euler(rotation)) * (Vector3.forward * (length / 2)); + Vector3 offsetFromCenter = relativeStartWithRotation + player.transform.rotation * offsetWithRotationAndLength; + + // Also create a rotation for use with the gizmos. Mainly just to shorten the lines + Quaternion gizmosRotation = player.transform.rotation * Quaternion.LookRotation(direction) * Quaternion.Euler(rotation); + Vector3 firstBoxOffset = gizmosRotation * (Vector3.forward * size.z); Color gizmoColor = Evaluate(player) ? Color.green : Color.red; gizmoColor = active ? gizmoColor : Color.gray; using (Draw.ingame.WithColor(gizmoColor)){ - Vector3 labelStartPos = Vector3.zero; - switch (labelLocation) { - case LabelDrawingLocation.PlayerOffset: - labelStartPos = player.transform.position + labelLocationOffset; - break; - case LabelDrawingLocation.IntersectingLength: - labelStartPos = (relativeStart + (player.transform.rotation * direction * length) / 2f ) + labelLocationOffset; - break; - case LabelDrawingLocation.HitLocation:{ - if (hit.transform != null) { - labelStartPos = hit.point + labelLocationOffset; - } - - break; - } - } - switch (castType) { case CastType.Ray: Draw.ingame.Line(relativeStart, relativeStart + (player.transform.rotation * direction.normalized) * length); @@ -152,35 +151,88 @@ public class EnvironmentObserver{ case CastType.BoxOverlap: Draw.ingame.WireBox(relativeStartWithRotation, player.transform.rotation * Quaternion.Euler(rotation), size); break; - case CastType.SphereOverlap: + case CastType.SphereCast: + Draw.ingame.SolidCircle(relativeStartWithRotation, relativeStartWithRotation - Camera.main.transform.position, width * 1, gizmoColor.Alpha(.5f)); + Draw.ingame.WireCapsule(relativeStartWithRotation, relativeStartWithRotation + gizmosRotation * (Vector3.forward * (length - width / 2)), width); break; case CastType.BoxCast: - // Create an offset start point for the center of the wirebox, since gizmos are drawn with their pivot in the center. - Vector3 offsetWithRotationAndLength = (Quaternion.LookRotation(direction) * Quaternion.Euler(rotation)) * (Vector3.forward * length / 2f); - Vector3 offsetFromCenter = relativeStartWithRotation + player.transform.rotation * offsetWithRotationAndLength; - - // Also create a rotation for use with the gizmos. Mainly just to shorten the lines - Quaternion gizmosRotation = player.transform.rotation * Quaternion.LookRotation(direction) * Quaternion.Euler(rotation); - // Draw the gizmos for the boxcast - Draw.ingame.WireBox(relativeStartWithRotation, gizmosRotation, Vector3.one * width); - Draw.ingame.WireBox(offsetFromCenter, gizmosRotation, new float3(width, width, length + width)); + Draw.ingame.WireBox(offsetFromCenter, gizmosRotation, new float3(size.x, size.y, length)); + Draw.ingame.SolidBox(relativeStartWithRotation, gizmosRotation, size, gizmoColor.Alpha(.1f)); + + Draw.ingame.WireBox(relativeStartWithRotation, gizmosRotation, size); break; default: throw new ArgumentOutOfRangeException(); } + + Draw.ingame.SolidCircle(relativeStartWithRotation, relativeStartWithRotation - Camera.main.transform.position, .4f); + Draw.ingame.SolidCircle(hit.point, hit.point - Camera.main.transform.position, .4f); - Draw.ingame.Label3D( - labelStartPos, - player.transform.rotation * Quaternion.Euler(labelRotationOffset), - hit.collider == null ? "" : hit.collider.name, - .5f, - LabelAlignment.Center, - Color.black - ); + // Set up variables for label (not hit name) + Vector3 labelStartPos = Vector3.zero; + switch (labelTextLocation) { + case LabelDrawingLocation.PlayerOffset: + labelStartPos = player.transform.position; + break; + case LabelDrawingLocation.IntersectingLength: + labelStartPos = offsetFromCenter; + break; + case LabelDrawingLocation.HitLocation:{ + if (hit.transform != null) { + labelStartPos = hit.point; + } + + break; + } + } + + // Draw label + if (drawLabel) { + Draw.ingame.Label3D( + labelStartPos + labelLocationOffset, + gizmosRotation * Quaternion.Euler(labelRotationOffset), + label, + labelSize, + LabelAlignment.MiddleLeft, + gizmoColor + ); + } + + // Set up variables for hit name + // Since the label is already drawn just use the previous startPos + switch (labelTextLocation) { + case LabelDrawingLocation.PlayerOffset: + labelStartPos = player.transform.position; + break; + case LabelDrawingLocation.IntersectingLength: + labelStartPos = offsetFromCenter; + break; + case LabelDrawingLocation.HitLocation:{ + if (hit.transform != null) { + labelStartPos = hit.point; + } + + break; + } + } + + // Draw hitname + if (drawLabel) { + Draw.ingame.Label3D( + labelStartPos + labelLocationOffset, + gizmosRotation * Quaternion.Euler(labelRotationOffset), + label, + hitTextSize, + LabelAlignment.MiddleLeft, + gizmoColor + ); + } Sirenix.Utilities.Editor.GUIHelper.RequestRepaint(); } + + } static Color GetObserverStatusColorStatic(bool active, RaycastHit hit){