This commit is contained in:
CortexCore 2023-12-16 23:30:08 +08:00
parent 78216a3d47
commit 961ae8feb4
33 changed files with 369 additions and 148 deletions

View File

@ -21,7 +21,7 @@ MonoBehaviour:
- Key: mp_respawn_on_death
Value: 0
- Key: cl_survival_lifecycle_enabled
Value: false
Value: true
- Key: sp_knockdown_disabled
Value: false
- Key: sp_keepInventory

View File

@ -189,7 +189,7 @@ MonoBehaviour:
failOperation: 0
zFailOperation: 2
m_ShadowTransparentReceive: 0
m_RenderingMode: 2
m_RenderingMode: 1
m_DepthPrimingMode: 0
m_CopyDepthMode: 0
m_AccurateGbufferNormals: 0

View File

@ -12,18 +12,18 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7a686a47eee2fa44cb0a34b5d86e4d5e, type: 3}
m_Name: AI_Shooter
m_EditorClassIdentifier:
_serializedGraph: '{"type":"NodeCanvas.BehaviourTrees.BehaviourTree","nodes":[{"dynamic":true,"_position":{"x":544.0,"y":125.6667},"$type":"NodeCanvas.BehaviourTrees.Parallel","$id":"0"},{"dynamic":true,"_position":{"x":308.6327,"y":258.1422},"$type":"NodeCanvas.BehaviourTrees.Parallel","$id":"1"},{"_action":{"sensor":{"_name":"Sensor","_targetVariableID":"d648241e-321f-48dd-a4e3-d661ee461283"},"target":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"$type":"BITKit.NodeCanvas.SmartTargetDetectionNode"},"_position":{"x":254.0835,"y":369.7769},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"2"},{"_condition":{"conditions":[{"variable":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"_invert":true,"$type":"NodeCanvas.Tasks.Conditions.CheckNull"},{"target":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"$type":"BITKit.TargetIsAlive"}],"$type":"NodeCanvas.Framework.ConditionList"},"_position":{"x":549.1844,"y":275.5882},"$type":"NodeCanvas.BehaviourTrees.BinarySelector","$id":"3"},{"_condition":{"target":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"maxDistance":{"_value":64.0},"layerMask":{"_value":{"value":1}},"awarnessDistance":{"_value":1.0},"viewAngle":{"_value":70.0},"offset":{"y":1.0},"$type":"NodeCanvas.Tasks.Conditions.CanSeeTarget"},"_position":{"x":446.8694,"y":498.0947},"$type":"NodeCanvas.BehaviourTrees.BinarySelector","$id":"4"},{"dynamic":true,"_position":{"x":478.9857,"y":729.4525},"$type":"NodeCanvas.BehaviourTrees.Parallel","$id":"5"},{"_action":{"target":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"repeat":{"_value":true},"$type":"BITKit.Node.LookTargetSmooth"},"_position":{"x":87.52032,"y":853.0034},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"6"},{"_condition":{"checkTarget":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"distance":{"_value":1.6},"$type":"NodeCanvas.Tasks.Conditions.CheckDistanceToGameObject"},"_position":{"x":324.6918,"y":862.5242},"$type":"NodeCanvas.BehaviourTrees.BinarySelector","$id":"7"},{"_action":{"entity":{"_name":"Entity","_targetVariableID":"9c6ef538-dedf-4070-9feb-a71566e239b8"},"command":{"_value":"Melee"},"intParameter":{},"floatParameter":{},"stringParameter":{},"$type":"BITKit.InvokeEntityCommand"},"_position":{"x":238.2697,"y":986.7622},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"8"},{"_action":{"entity":{"_name":"Entity","_targetVariableID":"9c6ef538-dedf-4070-9feb-a71566e239b8"},"command":{"_value":"Fire"},"intParameter":{},"floatParameter":{},"stringParameter":{},"$type":"BITKit.InvokeEntityCommand"},"_position":{"x":428.3638,"y":987.4536},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"9"},{"_condition":{"checkTarget":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"distance":{"_value":6.0},"$type":"NodeCanvas.Tasks.Conditions.CheckDistanceToGameObject"},"_position":{"x":676.3502,"y":851.4033},"$type":"NodeCanvas.BehaviourTrees.BinarySelector","$id":"10"},{"dynamic":true,"_position":{"x":583.298,"y":1056.772},"$type":"NodeCanvas.BehaviourTrees.Parallel","$id":"11"},{"_condition":{"probability":{"_value":0.16},"maxValue":{"_value":1.0},"$type":"NodeCanvas.Tasks.Conditions.Probability"},"_position":{"x":458.5199,"y":1166.235},"$type":"NodeCanvas.BehaviourTrees.ConditionNode","$id":"12"},{"_action":{"speed":{"_name":"Aim
Move Speed","_targetVariableID":"85ddc77d-9e68-4489-bd7d-e9cb23661f86"},"keepDistance":{"_value":0.1},"minWanderDistance":{"_value":0.64},"maxWanderDistance":{"_value":1.0},"$type":"NodeCanvas.Tasks.Actions.Wander"},"_position":{"x":615.5132,"y":1169.973},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"13"},{"dynamic":true,"_position":{"x":810.8378,"y":1050.127},"$type":"NodeCanvas.BehaviourTrees.Parallel","$id":"14"},{"_action":{"target":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"speed":{"_name":"Basic
Move Speed","_targetVariableID":"efcf1d0b-020c-4c56-af5e-2ae04d2bbf29"},"fledDistance":{"_value":6.0},"lookAhead":{"_value":6.0},"$type":"NodeCanvas.Tasks.Actions.Flee"},"_position":{"x":792.3795,"y":1173.204},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"15"},{"dynamic":true,"_position":{"x":1072.855,"y":796.6577},"$type":"NodeCanvas.BehaviourTrees.Parallel","$id":"16"},{"_condition":{"targetPosition":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"savePathAs":{"_name":""},"$type":"NodeCanvas.Tasks.Conditions.PathExists"},"_position":{"x":1176.26,"y":893.3289},"$type":"NodeCanvas.BehaviourTrees.BinarySelector","$id":"17"},{"_position":{"x":1103.0,"y":1006.667},"$type":"NodeCanvas.BehaviourTrees.Parallel","$id":"18"},{"_condition":{"LOSTarget":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"layerMask":{"_value":{"value":1}},"offset":{"y":1.0},"saveDistanceAs":{"_name":""},"$type":"NodeCanvas.Tasks.Conditions.CheckLOS"},"_position":{"x":1189.0,"y":1100.667},"$type":"NodeCanvas.BehaviourTrees.BinarySelector","$id":"19"},{"dynamic":true,"_position":{"x":1077.894,"y":1254.667},"$type":"NodeCanvas.BehaviourTrees.Parallel","$id":"20"},{"_action":{"target":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"speed":{"_name":"Basic
Move Speed","_targetVariableID":"efcf1d0b-020c-4c56-af5e-2ae04d2bbf29"},"keepDistance":{"_value":4.0},"$type":"NodeCanvas.Tasks.Actions.MoveToGameObject"},"_position":{"x":982.2366,"y":1440.21},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"21"},{"_action":{"target":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"repeat":{},"$type":"BITKit.Node.LookTargetSmooth"},"_position":{"x":1139.833,"y":1440.344},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"22"},{"dynamic":true,"_position":{"x":1339.577,"y":1254.394},"$type":"NodeCanvas.BehaviourTrees.Parallel","$id":"23"},{"_action":{"target":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"speed":{"_name":"Basic
Move Speed","_targetVariableID":"efcf1d0b-020c-4c56-af5e-2ae04d2bbf29"},"keepDistance":{"_value":1.0},"$type":"NodeCanvas.Tasks.Actions.MoveToGameObject"},"_position":{"x":1361.747,"y":1432.927},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"24"},{"_position":{"x":1431.909,"y":1011.667},"$type":"NodeCanvas.BehaviourTrees.Parallel","$id":"25"},{"_action":{"speed":{"_name":"Basic
Move Speed","_targetVariableID":"efcf1d0b-020c-4c56-af5e-2ae04d2bbf29"},"keepDistance":{"_value":0.1},"minWanderDistance":{"_value":5.0},"maxWanderDistance":{"_value":20.0},"$type":"NodeCanvas.Tasks.Actions.Wander"},"_position":{"x":1458.289,"y":1109.696},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"26"},{"_position":{"x":682.168,"y":503.1348},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"27"}],"connections":[{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"3"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"2"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"3"},"_targetNode":{"$ref":"4"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"3"},"_targetNode":{"$ref":"27"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"4"},"_targetNode":{"$ref":"5"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"4"},"_targetNode":{"$ref":"16"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"5"},"_targetNode":{"$ref":"6"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"5"},"_targetNode":{"$ref":"7"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"5"},"_targetNode":{"$ref":"10"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"7"},"_targetNode":{"$ref":"8"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"7"},"_targetNode":{"$ref":"9"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"10"},"_targetNode":{"$ref":"11"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"10"},"_targetNode":{"$ref":"14"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"11"},"_targetNode":{"$ref":"12"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"11"},"_targetNode":{"$ref":"13"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"14"},"_targetNode":{"$ref":"15"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"16"},"_targetNode":{"$ref":"17"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"17"},"_targetNode":{"$ref":"18"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"17"},"_targetNode":{"$ref":"25"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"18"},"_targetNode":{"$ref":"19"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"19"},"_targetNode":{"$ref":"20"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"19"},"_targetNode":{"$ref":"23"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"20"},"_targetNode":{"$ref":"21"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"20"},"_targetNode":{"$ref":"22"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"23"},"_targetNode":{"$ref":"24"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"25"},"_targetNode":{"$ref":"26"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"}],"canvasGroups":[],"localBlackboard":{"_variables":{}},"derivedData":{"repeat":true,"$type":"NodeCanvas.BehaviourTrees.BehaviourTree+DerivedSerializationData"}}'
_serializedGraph: '{"type":"NodeCanvas.BehaviourTrees.BehaviourTree","nodes":[{"_position":{"x":544.9802,"y":125.6692},"$type":"NodeCanvas.BehaviourTrees.Sequencer","$id":"0"},{"_action":{"sensor":{"_name":"Sensor","_targetVariableID":"d648241e-321f-48dd-a4e3-d661ee461283"},"target":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"$type":"BITKit.NodeCanvas.SmartTargetDetectionNode"},"_position":{"x":267.8417,"y":287.2277},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"1"},{"_condition":{"conditions":[{"variable":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"_invert":true,"$type":"NodeCanvas.Tasks.Conditions.CheckNull"},{"target":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"$type":"BITKit.TargetIsAlive"}],"$type":"NodeCanvas.Framework.ConditionList"},"_position":{"x":550.1645,"y":275.5882},"$type":"NodeCanvas.BehaviourTrees.BinarySelector","$id":"2"},{"_condition":{"target":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"maxDistance":{"_value":64.0},"layerMask":{"_value":{"value":1}},"awarnessDistance":{"_value":1.0},"viewAngle":{"_value":70.0},"offset":{"y":1.0},"$type":"NodeCanvas.Tasks.Conditions.CanSeeTarget"},"_position":{"x":446.8694,"y":498.0947},"$type":"NodeCanvas.BehaviourTrees.BinarySelector","$id":"3"},{"dynamic":true,"_position":{"x":478.9857,"y":729.4525},"$type":"NodeCanvas.BehaviourTrees.Parallel","$id":"4"},{"_action":{"target":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"repeat":{"_value":true},"$type":"BITKit.Node.LookTargetSmooth"},"_position":{"x":87.52032,"y":853.0034},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"5"},{"_condition":{"checkTarget":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"distance":{"_value":1.6},"$type":"NodeCanvas.Tasks.Conditions.CheckDistanceToGameObject"},"_position":{"x":324.6918,"y":862.5242},"$type":"NodeCanvas.BehaviourTrees.BinarySelector","$id":"6"},{"_action":{"entity":{"_name":"Entity","_targetVariableID":"9c6ef538-dedf-4070-9feb-a71566e239b8"},"command":{"_value":"Melee"},"intParameter":{},"floatParameter":{},"stringParameter":{},"$type":"BITKit.InvokeEntityCommand"},"_position":{"x":238.2697,"y":986.7622},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"7"},{"_action":{"entity":{"_name":"Entity","_targetVariableID":"9c6ef538-dedf-4070-9feb-a71566e239b8"},"command":{"_value":"Fire"},"intParameter":{},"floatParameter":{},"stringParameter":{},"$type":"BITKit.InvokeEntityCommand"},"_position":{"x":428.3638,"y":987.4536},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"8"},{"_condition":{"checkTarget":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"distance":{"_value":6.0},"$type":"NodeCanvas.Tasks.Conditions.CheckDistanceToGameObject"},"_position":{"x":676.3502,"y":851.4033},"$type":"NodeCanvas.BehaviourTrees.BinarySelector","$id":"9"},{"dynamic":true,"_position":{"x":583.298,"y":1056.772},"$type":"NodeCanvas.BehaviourTrees.Parallel","$id":"10"},{"_condition":{"probability":{"_value":0.16},"maxValue":{"_value":1.0},"$type":"NodeCanvas.Tasks.Conditions.Probability"},"_position":{"x":458.5199,"y":1166.235},"$type":"NodeCanvas.BehaviourTrees.ConditionNode","$id":"11"},{"_action":{"speed":{"_name":"Aim
Move Speed","_targetVariableID":"85ddc77d-9e68-4489-bd7d-e9cb23661f86"},"keepDistance":{"_value":0.1},"minWanderDistance":{"_value":0.64},"maxWanderDistance":{"_value":1.0},"$type":"NodeCanvas.Tasks.Actions.Wander"},"_position":{"x":615.5132,"y":1169.973},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"12"},{"dynamic":true,"_position":{"x":810.8378,"y":1050.127},"$type":"NodeCanvas.BehaviourTrees.Parallel","$id":"13"},{"_action":{"target":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"speed":{"_name":"Basic
Move Speed","_targetVariableID":"efcf1d0b-020c-4c56-af5e-2ae04d2bbf29"},"fledDistance":{"_value":6.0},"lookAhead":{"_value":6.0},"$type":"NodeCanvas.Tasks.Actions.Flee"},"_position":{"x":792.3795,"y":1173.204},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"14"},{"dynamic":true,"_position":{"x":1072.855,"y":796.6577},"$type":"NodeCanvas.BehaviourTrees.Parallel","$id":"15"},{"_condition":{"targetPosition":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"savePathAs":{"_name":""},"$type":"NodeCanvas.Tasks.Conditions.PathExists"},"_position":{"x":1176.26,"y":893.3289},"$type":"NodeCanvas.BehaviourTrees.BinarySelector","$id":"16"},{"_position":{"x":1103.0,"y":1006.667},"$type":"NodeCanvas.BehaviourTrees.Parallel","$id":"17"},{"_condition":{"LOSTarget":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"layerMask":{"_value":{"value":1}},"offset":{"y":1.0},"saveDistanceAs":{"_name":""},"$type":"NodeCanvas.Tasks.Conditions.CheckLOS"},"_position":{"x":1189.0,"y":1100.667},"$type":"NodeCanvas.BehaviourTrees.BinarySelector","$id":"18"},{"dynamic":true,"_position":{"x":1077.894,"y":1254.667},"$type":"NodeCanvas.BehaviourTrees.Parallel","$id":"19"},{"_action":{"target":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"speed":{"_name":"Basic
Move Speed","_targetVariableID":"efcf1d0b-020c-4c56-af5e-2ae04d2bbf29"},"keepDistance":{"_value":4.0},"waitUntilFinish":{},"$type":"NodeCanvas.Tasks.Actions.MoveToGameObject"},"_position":{"x":982.2366,"y":1440.21},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"20"},{"_action":{"target":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"repeat":{},"$type":"BITKit.Node.LookTargetSmooth"},"_position":{"x":1139.833,"y":1440.344},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"21"},{"dynamic":true,"_position":{"x":1339.577,"y":1254.394},"$type":"NodeCanvas.BehaviourTrees.Parallel","$id":"22"},{"_action":{"target":{"_name":"Target","_targetVariableID":"7e434d61-d448-41a6-91d9-50c35408f293"},"speed":{"_name":"Basic
Move Speed","_targetVariableID":"efcf1d0b-020c-4c56-af5e-2ae04d2bbf29"},"keepDistance":{"_value":1.0},"waitUntilFinish":{},"$type":"NodeCanvas.Tasks.Actions.MoveToGameObject"},"_position":{"x":1361.747,"y":1432.927},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"23"},{"_position":{"x":1431.909,"y":1011.667},"$type":"NodeCanvas.BehaviourTrees.Parallel","$id":"24"},{"_action":{"speed":{"_name":"Basic
Move Speed","_targetVariableID":"efcf1d0b-020c-4c56-af5e-2ae04d2bbf29"},"keepDistance":{"_value":0.1},"minWanderDistance":{"_value":5.0},"maxWanderDistance":{"_value":20.0},"$type":"NodeCanvas.Tasks.Actions.Wander"},"_position":{"x":1458.289,"y":1109.696},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"25"},{"_position":{"x":682.168,"y":503.1348},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"26"}],"connections":[{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"2"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"2"},"_targetNode":{"$ref":"3"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"2"},"_targetNode":{"$ref":"26"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"3"},"_targetNode":{"$ref":"4"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"3"},"_targetNode":{"$ref":"15"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"4"},"_targetNode":{"$ref":"5"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"4"},"_targetNode":{"$ref":"6"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"4"},"_targetNode":{"$ref":"9"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"6"},"_targetNode":{"$ref":"7"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"6"},"_targetNode":{"$ref":"8"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"9"},"_targetNode":{"$ref":"10"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"9"},"_targetNode":{"$ref":"13"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"10"},"_targetNode":{"$ref":"11"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"10"},"_targetNode":{"$ref":"12"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"13"},"_targetNode":{"$ref":"14"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"15"},"_targetNode":{"$ref":"16"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"16"},"_targetNode":{"$ref":"17"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"16"},"_targetNode":{"$ref":"24"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"17"},"_targetNode":{"$ref":"18"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"18"},"_targetNode":{"$ref":"19"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"18"},"_targetNode":{"$ref":"22"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"19"},"_targetNode":{"$ref":"20"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"19"},"_targetNode":{"$ref":"21"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"22"},"_targetNode":{"$ref":"23"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"24"},"_targetNode":{"$ref":"25"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"}],"canvasGroups":[],"localBlackboard":{"_variables":{}},"derivedData":{"repeat":true,"$type":"NodeCanvas.BehaviourTrees.BehaviourTree+DerivedSerializationData"}}'
_objectReferences: []
_graphSource:
_version: 3.29
_category:
_comments:
_translation: {x: 132.95525, y: -79.08593}
_zoomFactor: 0.9300528
_translation: {x: -222, y: -720}
_zoomFactor: 0.6848334
_haltSerialization: 0
_externalSerializationFile: {fileID: 0}

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,6 @@ GameObject:
- component: {fileID: 4248894547058506011}
- component: {fileID: 890976194991281065}
- component: {fileID: 5871123967126007354}
- component: {fileID: 2333353213815280755}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
@ -207,26 +206,3 @@ MonoBehaviour:
inactiveLayer:
serializedVersion: 2
m_Bits: 98167
--- !u!114 &2333353213815280755
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6453993093768169961}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4ee01e66702087b4798e633ca34c7956, type: 3}
m_Name:
m_EditorClassIdentifier:
maxUpdateRate: Infinity
preview: 0
blurAlgorithmSelection: 0
blurConfig: {fileID: 11400000, guid: e01f12beee149ec4eaee09aa1f252094, type: 2}
downsample: 0
blurRegion:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1

View File

@ -8293,10 +8293,10 @@ PrefabInstance:
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 8241496228184929341, guid: 5f9e9216c9925af4bafec02dca8c438e,
- targetCorrespondingSourceObject: {fileID: 1630585989029977934, guid: 5f9e9216c9925af4bafec02dca8c438e,
type: 3}
insertIndex: -1
addedObject: {fileID: 3461924177927409203}
addedObject: {fileID: 7878091637913408031}
m_SourcePrefab: {fileID: 100100000, guid: 5f9e9216c9925af4bafec02dca8c438e, type: 3}
--- !u!136 &101485516966416300 stripped
CapsuleCollider:
@ -8412,6 +8412,25 @@ CapsuleCollider:
type: 3}
m_PrefabInstance: {fileID: 3648022406799836390}
m_PrefabAsset: {fileID: 0}
--- !u!1 &2594460809973472168 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1630585989029977934, guid: 5f9e9216c9925af4bafec02dca8c438e,
type: 3}
m_PrefabInstance: {fileID: 3648022406799836390}
m_PrefabAsset: {fileID: 0}
--- !u!114 &7878091637913408031
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2594460809973472168}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4545676a36650b9468ce106eb4c8d4bc, type: 3}
m_Name:
m_EditorClassIdentifier:
fpvScale: {fileID: 8987432455605705394}
--- !u!54 &2925289570595806222 stripped
Rigidbody:
m_CorrespondingSourceObject: {fileID: 1889495685208529128, guid: 5f9e9216c9925af4bafec02dca8c438e,
@ -8496,24 +8515,6 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 3648022406799836390}
m_PrefabAsset: {fileID: 0}
--- !u!1 &4683686620184408283 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 8241496228184929341, guid: 5f9e9216c9925af4bafec02dca8c438e,
type: 3}
m_PrefabInstance: {fileID: 3648022406799836390}
m_PrefabAsset: {fileID: 0}
--- !u!114 &3461924177927409203
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4683686620184408283}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4545676a36650b9468ce106eb4c8d4bc, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!136 &4785396917302097201 stripped
CapsuleCollider:
m_CorrespondingSourceObject: {fileID: 8127101947278930391, guid: 5f9e9216c9925af4bafec02dca8c438e,
@ -8604,6 +8605,12 @@ Rigidbody:
type: 3}
m_PrefabInstance: {fileID: 3648022406799836390}
m_PrefabAsset: {fileID: 0}
--- !u!4 &8987432455605705394 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 5627713095830445652, guid: 5f9e9216c9925af4bafec02dca8c438e,
type: 3}
m_PrefabInstance: {fileID: 3648022406799836390}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &3765549687832476295
PrefabInstance:
m_ObjectHideFlags: 0

View File

@ -1996,7 +1996,7 @@ ConfigurableJoint:
m_Anchor: {x: 0, y: 0, z: 0}
m_Axis: {x: 1, y: 0, z: 0}
m_AutoConfigureConnectedAnchor: 1
m_ConnectedAnchor: {x: 0.00000005245368, y: -0.00000011920929, z: 0.000000059604666}
m_ConnectedAnchor: {x: 0.99999994, y: 0.59999996, z: 7}
serializedVersion: 3
m_SecondaryAxis: {x: 0, y: 1, z: 0}
m_XMotion: 2

View File

@ -99,6 +99,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
playerInput: {fileID: 2935791889939805683}
vehicle: {fileID: 0}
--- !u!114 &2935791889939805683
MonoBehaviour:
m_ObjectHideFlags: 0
@ -469,6 +470,15 @@ MonoBehaviour:
rigidbody: {fileID: 9132435487728605416}
collider: {fileID: 7614104854193810448}
model: {fileID: 737323033357955437}
fixedPlace:
rid: 7707057888875512007
references:
version: 2
RefIds:
- rid: 7707057888875512007
type: {class: MonoPlayerFixedPlace, ns: BITFALL.Player.Movement, asm: BITFALL.Scenes}
data:
playerFixedPlace: {fileID: 6423994321310477280}
--- !u!1 &380879760591024748
GameObject:
m_ObjectHideFlags: 0

View File

@ -9,6 +9,7 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 5964803017347144284}
- component: {fileID: 7177434048154276567}
- component: {fileID: 2126668844316887849}
- component: {fileID: 673930142905110667}
- component: {fileID: 1765543596226114749}
@ -52,6 +53,29 @@ Transform:
- {fileID: 261189247636088016}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!136 &7177434048154276567
CapsuleCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1610736432900663163}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.32
m_Height: 1.6
m_Direction: 1
m_Center: {x: 0, y: 0.8, z: 0}
--- !u!114 &2126668844316887849
MonoBehaviour:
m_ObjectHideFlags: 0
@ -405,8 +429,8 @@ MonoBehaviour:
_getDamage:
rid: 806583346156273669
aliveCollider:
allow: 0
value: {fileID: 0}
allow: 1
value: {fileID: 7177434048154276567}
allowAnimatorParameter: 0
physicsBasedAnimation:
allow: 0
@ -552,6 +576,11 @@ PrefabInstance:
propertyPath: m_Name
value: Hitbox
objectReference: {fileID: 0}
- target: {fileID: 150634226952185381, guid: d6020a576e13b6d43bd1143a33ff7f8e,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 188815475637777487, guid: d6020a576e13b6d43bd1143a33ff7f8e,
type: 3}
propertyPath: m_LocalPosition.x
@ -1196,6 +1225,11 @@ PrefabInstance:
propertyPath: fov
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8772707305530588351, guid: 2ad4d682518910847b19ed8106c0071a,
type: 3}
propertyPath: ignoreColliders.Array.data[0]
value:
objectReference: {fileID: 7177434048154276567}
- target: {fileID: 9015502658869033244, guid: 2ad4d682518910847b19ed8106c0071a,
type: 3}
propertyPath: ignoreTags.allow

View File

@ -10512,6 +10512,11 @@ PrefabInstance:
propertyPath: m_LocalPosition.x
value: 0.7999984
objectReference: {fileID: 0}
- target: {fileID: 3628348256900614807, guid: f18510934c4581d47819abfbf1bd3647,
type: 3}
propertyPath: m_LocalPosition.y
value: 1.099999
objectReference: {fileID: 0}
- target: {fileID: 3628348256900614807, guid: f18510934c4581d47819abfbf1bd3647,
type: 3}
propertyPath: m_LocalPosition.z
@ -11783,8 +11788,54 @@ PrefabInstance:
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 6453993093768169961, guid: f25aeccf4aba96b43a20d93ee9fa4e6e,
type: 3}
insertIndex: -1
addedObject: {fileID: 9060155491775007191}
- targetCorrespondingSourceObject: {fileID: 6453993093768169961, guid: f25aeccf4aba96b43a20d93ee9fa4e6e,
type: 3}
insertIndex: -1
addedObject: {fileID: 9060155491775007190}
m_SourcePrefab: {fileID: 100100000, guid: f25aeccf4aba96b43a20d93ee9fa4e6e, type: 3}
--- !u!1 &9060155491775007189 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 6453993093768169961, guid: f25aeccf4aba96b43a20d93ee9fa4e6e,
type: 3}
m_PrefabInstance: {fileID: 9060155491775007188}
m_PrefabAsset: {fileID: 0}
--- !u!114 &9060155491775007190
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9060155491775007189}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b98a6db0b653f764eac834f85857a9dd, type: 3}
m_Name:
m_EditorClassIdentifier:
_parentBlackboard: {fileID: 0}
_serializedBlackboard: '{"_variables":{}}'
_objectReferences: []
_serializedVariables: []
--- !u!114 &9060155491775007191
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9060155491775007189}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 771e8d04ad23ec04ca6178c3be664c99, type: 3}
m_Name:
m_EditorClassIdentifier:
playOnAwake: 1
_serializedList: '{"actions":[{"$type":"NodeCanvas.Tasks.Actions.DestroyGameObject"}]}'
_objectReferences: []
_blackboard: {fileID: 9060155491775007190}
--- !u!1660057539 &9223372036854775807
SceneRoots:
m_ObjectHideFlags: 0

View File

@ -24359,12 +24359,12 @@ PrefabInstance:
- target: {fileID: 2889224903482049437, guid: f7b831c9117af914d81247e3a751b182,
type: 3}
propertyPath: m_LocalPosition.x
value: 0.8000032
value: 0.79999304
objectReference: {fileID: 0}
- target: {fileID: 2889224903482049437, guid: f7b831c9117af914d81247e3a751b182,
type: 3}
propertyPath: m_LocalPosition.z
value: -0.0000013709068
value: 0.000005185604
objectReference: {fileID: 0}
- target: {fileID: 2889224903482049437, guid: f7b831c9117af914d81247e3a751b182,
type: 3}
@ -24514,7 +24514,7 @@ PrefabInstance:
- target: {fileID: 6692343672255736451, guid: f7b831c9117af914d81247e3a751b182,
type: 3}
propertyPath: m_LocalPosition.x
value: 189.25
value: 154.6
objectReference: {fileID: 0}
- target: {fileID: 6692343672255736451, guid: f7b831c9117af914d81247e3a751b182,
type: 3}
@ -24524,12 +24524,12 @@ PrefabInstance:
- target: {fileID: 6692343672255736451, guid: f7b831c9117af914d81247e3a751b182,
type: 3}
propertyPath: m_LocalPosition.z
value: -143.76
value: -154.4
objectReference: {fileID: 0}
- target: {fileID: 6692343672255736451, guid: f7b831c9117af914d81247e3a751b182,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.7071075
value: -0.13052501
objectReference: {fileID: 0}
- target: {fileID: 6692343672255736451, guid: f7b831c9117af914d81247e3a751b182,
type: 3}
@ -24539,7 +24539,7 @@ PrefabInstance:
- target: {fileID: 6692343672255736451, guid: f7b831c9117af914d81247e3a751b182,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.7071062
value: 0.99144506
objectReference: {fileID: 0}
- target: {fileID: 6692343672255736451, guid: f7b831c9117af914d81247e3a751b182,
type: 3}
@ -24554,7 +24554,7 @@ PrefabInstance:
- target: {fileID: 6692343672255736451, guid: f7b831c9117af914d81247e3a751b182,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 90
value: 195
objectReference: {fileID: 0}
- target: {fileID: 6692343672255736451, guid: f7b831c9117af914d81247e3a751b182,
type: 3}
@ -48716,7 +48716,7 @@ PrefabInstance:
- target: {fileID: 5964803017347144284, guid: 87496a4c1c33c9f4a9a90a9757655d40,
type: 3}
propertyPath: m_LocalPosition.x
value: 185.65
value: 184.65
objectReference: {fileID: 0}
- target: {fileID: 5964803017347144284, guid: 87496a4c1c33c9f4a9a90a9757655d40,
type: 3}
@ -48726,7 +48726,7 @@ PrefabInstance:
- target: {fileID: 5964803017347144284, guid: 87496a4c1c33c9f4a9a90a9757655d40,
type: 3}
propertyPath: m_LocalPosition.z
value: -143.76
value: -146.26
objectReference: {fileID: 0}
- target: {fileID: 5964803017347144284, guid: 87496a4c1c33c9f4a9a90a9757655d40,
type: 3}

View File

@ -26,7 +26,7 @@ RenderSettings:
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 2100000, guid: f6c51332ac7d92541a38fb263b09d2a8, type: 2}
m_SkyboxMaterial: {fileID: 2100000, guid: 3afd1c7f9b00d254a9880e3445eee85c, type: 2}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
@ -12645,7 +12645,7 @@ MonoBehaviour:
priority: 0
blendDistance: 0
weight: 1
sharedProfile: {fileID: 11400000, guid: 150010a6b77b9944ba0794fe87e2adff, type: 2}
sharedProfile: {fileID: 11400000, guid: 291a106b25af4384f89ad564ba3eeac7, type: 2}
--- !u!1001 &2049106032
PrefabInstance:
m_ObjectHideFlags: 0

View File

@ -3,10 +3,10 @@
"rootNamespace": "",
"references": [
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
"GUID:66d2ae14764cc7d49aad4b16930747c0",
"GUID:49b49c76ee64f6b41bf28ef951cb0e50",
"GUID:6ef4ed8ff60a7aa4bb60a8030e6f4008",
"GUID:d8b63aba1907145bea998dd612889d6b"
"GUID:d8b63aba1907145bea998dd612889d6b",
"GUID:2665a8d13d1b3f18800f46e256720795"
],
"includePlatforms": [],
"excludePlatforms": [],

View File

@ -6,7 +6,8 @@
"GUID:87bea3a21c744b1478660b70494160ba",
"GUID:709caf8d7fb6ef24bbba0ab9962a3ad0",
"GUID:7efac18f239530141802fb139776f333",
"GUID:75469ad4d38634e559750d17036d5f7c"
"GUID:75469ad4d38634e559750d17036d5f7c",
"GUID:a3de65b07192e7d49bad7b4032d681de"
],
"includePlatforms": [],
"excludePlatforms": [],

View File

@ -1,6 +1,7 @@
using System;
using BITFALL;
using BITKit.Entities;
using BITKit.Entities.Physics;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.InputSystem;
@ -17,6 +18,9 @@ namespace BITKit
[Inject] private IHealth _health;
[Inject(true)] private IEntityOverride _override;
[Inject(true)]
private IEntityPhysics _physics;
#endregion
public override void OnStart()
@ -114,6 +118,11 @@ namespace BITKit
{
case false:
isDead = true;
if (_physics is not null)
{
_physics.Velocity = agent.velocity;
}
agent.ResetPath();
break;
case true when isDead:
{

View File

@ -7,9 +7,10 @@ namespace BITFALL.HotFix
{
public class FPVScaleFix : MonoBehaviour
{
[SerializeField] private Transform fpvScale;
private void LateUpdate()
{
transform.localScale = Vector3.zero;
fpvScale.localScale = Vector3.zero;
}
}
}

View File

@ -237,8 +237,8 @@ namespace BITFALL.Items
private void Tick(float obj)
{
if(gameService.CurrentState is not IGamePlayingState) return;
if(gameService.CurrentState is not IGamePlayingState || !this) return;
while (_registerQueue.TryDequeue(out var item))
{
if (!item || _worldItems.TryAdd(item.Id,item) is false) continue;

View File

@ -57,7 +57,7 @@ namespace BITFALL.Player.Survival
if (_health.IsAlive is false) return;
foreach (var x in Elements)
{
x.Value -= deltaTime;
x.Value -= x.Decay * deltaTime;
if (x.Value <= 0)
{
_damageService.Execute(new DamageMessage()

View File

@ -15,7 +15,9 @@ namespace BITKit
private void Start()
{
if(rigidbody.isKinematic)Destroy(this);
if (!rigidbody.isKinematic) return;
Destroy(this);
if(rigidbody)Destroy(rigidbody);
}
private void Update()
@ -24,6 +26,7 @@ namespace BITKit
if (_collider.gameObject.isStatic)
{
Destroy(this);
if(rigidbody)Destroy(rigidbody);
return;
}
enabled = false;

View File

@ -3,28 +3,30 @@ using System.Collections;
using System.Collections.Generic;
using System.Linq;
using BITKit;
using Unity.Burst;
using Unity.Collections;
using Unity.Jobs;
using Unity.Mathematics;
using UnityEngine;
using UnityEngine.Jobs;
using UnityEngine.Pool;
namespace BITFALL.Rig{
public class TickOverrideTranformService : MonoBehaviour
{
public struct SetTransformJob : IJobParallelForTransform
//[BurstCompile]
public struct CopyTransformJob : IJobParallelForTransform
{
// Jobs declare all data that will be accessed in the job
// By declaring it as read only, multiple jobs are allowed to access the data in parallel
[Unity.Collections.ReadOnly]
public NativeArray<Vector3> positions;
public NativeArray<float3> positions;
[Unity.Collections.ReadOnly]
public NativeArray<Quaternion> rotations;
public NativeArray<quaternion> rotations;
// The code actually running on the job
public void Execute(int index, TransformAccess transform)
{
transform.position = positions[index];
transform.rotation = rotations[index];
transform.SetPositionAndRotation(positions[index],rotations[index]);
}
}
public static void Register(int id,TickOverrideTransform tickOverrideTransform)
@ -40,12 +42,16 @@ namespace BITFALL.Rig{
private static readonly Dictionary<int, TickOverrideTransform> Dictionary = new();
private static bool IsDirty;
private static TickOverrideTransform[] Array;
private static Transform[] Sources;
private static Transform[] Targets;
[SerializeReference, SubclassSelector] private ITicker ticker;
private TransformAccessArray m_AccessArray;
private bool _isCompleted;
private NativeArray<quaternion> _rotations;
private NativeArray<float3> _positions;
private JobHandle _jobHandle;
private InitializationState _initializationState;
private void OnEnable()
{
ticker.Add(Tick);
@ -56,33 +62,59 @@ namespace BITFALL.Rig{
}
private void Tick(float obj)
{
if (!_isCompleted) return;
switch (_initializationState)
{
case InitializationState.Initializing when _jobHandle.IsCompleted:
_jobHandle.Complete();
_rotations.Dispose();
_positions.Dispose();
_initializationState = InitializationState.Initialized;
break;
case InitializationState.None:
break;
default:
return;
}
if (IsDirty)
{
Array = Dictionary.Values.ToArray();
var newLength = Dictionary.Count;
Sources = new Transform[newLength];
Targets = new Transform[newLength];
var index = 0;
foreach (var x in Dictionary.Values)
{
Sources[index] = x.Source;
Targets[index] = x.Target;
index++;
}
}
m_AccessArray = new TransformAccessArray(Array.Length);
var length = Sources.Length;
var rotations = new NativeArray<Quaternion>(Array.Length, Allocator.TempJob);
var positions = new NativeArray<Vector3>(Array.Length, Allocator.TempJob);
if(length is 0) return;
m_AccessArray = new TransformAccessArray(length);
m_AccessArray.SetTransforms(Sources);
var index = 0;
foreach (var x in Array)
_positions = new NativeArray<float3>(length, Allocator.Persistent);
_rotations = new NativeArray<quaternion>(length, Allocator.Persistent);
var i = 0;
foreach (var x in Targets)
{
positions[index] = x.Source.position;
rotations[index] = x.Source.rotation;
index++;
_positions[i] = x.position;
_rotations[i] = x.rotation;
i++;
}
var job = new SetTransformJob()
var _job = new CopyTransformJob()
{
positions = positions,
rotations = rotations
positions = _positions,
rotations = _rotations
};
job.Schedule(m_AccessArray);
_isCompleted = true;
_jobHandle = _job.Schedule(m_AccessArray);
_initializationState = InitializationState.Initializing;
}
}

View File

@ -9,6 +9,12 @@ using UnityEngine;
namespace BITFALL.Player.Movement
{
[Serializable]
public class MonoPlayerFixedPlace:AbstractPlayerFixedPlace
{
[SerializeField] private PlayerFixedPlace playerFixedPlace;
protected override IPlayerFixedPlace _playerFixedPlaceImplementation => playerFixedPlace;
}
public class PlayerFixedPlace :MonoBehaviour, IPlayerFixedPlace,IDescription
{
[SerializeField] private new Rigidbody rigidbody;

View File

@ -116,6 +116,11 @@ namespace BITFALL.UX
if (arg1.Position.IsDefault()) return;
var indicator =indicatorContainer.Create<VisualElement>(()=>indicatorAsset.CloneTree()[0]);
if (arg1.Damage is 0)
{
indicator[0].style.unityBackgroundImageTintColor = Color.black;
}
_indicators.Add((indicator, (Vector3)arg1.Position, Time.time + 1));
}

View File

@ -35,7 +35,6 @@ namespace BITFALL.UX
});
hitmarkerImage.GetVisualElement().SetOpacity(0);
}
@ -47,7 +46,7 @@ namespace BITFALL.UX
private void OnKilled(DamageMessage obj)
{
hitmarkerImage.GetVisualElement().style.unityBackgroundImageTintColor = Color.red;
Execute(obj,1);
Execute(obj);
}
private void OnDamage(DamageMessage obj)
@ -56,7 +55,7 @@ namespace BITFALL.UX
Execute(obj);
}
private async void Execute(DamageMessage obj,float duration=0.1f)
private void Execute(DamageMessage obj)
{
if ((Entity)obj.Target == playerService.LocalPlayer) return;
@ -68,11 +67,7 @@ namespace BITFALL.UX
destroyCancellationToken.Register(nextHitmarkerCancellationTokenSource.Cancel);
var sequence = BITween.CreateSequence();
// sequence.Append(
// BITween.MoveToForward(
// hitmarkerImage.GetVisualElement().SetOpacity,
// 0, 1,0.1f
// ));
sequence.Append(UniTask.Delay(200));
sequence.Append(
BITween.MoveToForward(
@ -88,18 +83,7 @@ namespace BITFALL.UX
0.16f, 1.32f,0.05f
));
scaleSequence.Play(nextHitmarkerCancellationTokenSource.Token).Forget();
// hitmarkerImage.GetVisualElement().SetOpacity(1);
//
// try
// {
// await Task.Delay(TimeSpan.FromSeconds(duration), nextHitmarkerCancellationTokenSource.Token);
// }
// catch (OperationCanceledException)
// {
// return;
// }
//
// hitmarkerImage.GetVisualElement().SetOpacity(0);
}
}

View File

@ -7,7 +7,9 @@
"GUID:709caf8d7fb6ef24bbba0ab9962a3ad0",
"GUID:1235ca61e7f433b408ed5a68767e7123",
"GUID:75469ad4d38634e559750d17036d5f7c",
"GUID:2e7f0f7a8ee6e144db6fb95614c6d8fe"
"GUID:2e7f0f7a8ee6e144db6fb95614c6d8fe",
"GUID:d525ad6bd40672747bde77962f1c401e",
"GUID:49b49c76ee64f6b41bf28ef951cb0e50"
],
"includePlatforms": [],
"excludePlatforms": [],

View File

@ -22,6 +22,8 @@ namespace BITKit.Vehicles
[SerializeField] private new Rigidbody rigidbody;
[SerializeField] private new Collider collider;
[SerializeField] private Transform model;
[SerializeReference,SubclassSelector] private IPlayerFixedPlace fixedPlace;
private Vector2 _movement;
@ -32,9 +34,10 @@ namespace BITKit.Vehicles
private bool _hover;
private bool _reset;
private IPlayerFixedPlace _fixedPlace;
private Transform Transform;
private Vector3 _initialPosition;
private Vector3 _initialPosition;
private readonly ValidHandle _resetHandle=new();
private void Start()
{
@ -50,6 +53,9 @@ private Vector3 _initialPosition;
var newRotation = Quaternion.LookRotation(Vector3.ProjectOnPlane(Transform.forward, Vector3.up));
rigidbody.MoveRotation(newRotation);
fixedPlace.OnPlayerEntered += x => _resetHandle.RemoveElement(111);
fixedPlace.OnPlayerExited += x => _resetHandle.AddElement(111);
}
private void FixedUpdate()
@ -59,7 +65,7 @@ private Vector3 _initialPosition;
var offsetX = Mathf.PerlinNoise(Time.time, 0) - 0.5f;
var offsetY = Mathf.PerlinNoise(0, Time.time) - 0.5f;
_resetHandle.SetElements(123,_reset);
rigidbody.useGravity = !_hover;
@ -70,7 +76,8 @@ private Vector3 _initialPosition;
var moveForce = up * (_AscendAndDescend * upForce * Time.fixedDeltaTime);
var newRotation = Quaternion.LookRotation(Vector3.ProjectOnPlane(Transform.forward, Vector3.up));
if (_reset)
if (_resetHandle)
{
rigidbody.AddTorque(MathV.CalculateTorque(Transform,newRotation) * (torqueResetDelta * Time.fixedDeltaTime),
ForceMode.VelocityChange);
@ -161,7 +168,5 @@ private Vector3 _initialPosition;
_reset = false;
}
}
}
}

View File

@ -25,4 +25,56 @@ namespace BITFALL.Player.Movement
bool Entry(IEntity player);
bool Exit(IEntity player);
}
public abstract class AbstractPlayerFixedPlace : IPlayerFixedPlace
{
protected abstract IPlayerFixedPlace _playerFixedPlaceImplementation { get; }
float3 IPlayerFixedPlace.FixedPosition => _playerFixedPlaceImplementation.FixedPosition;
float3 IPlayerFixedPlace.Velocity => _playerFixedPlaceImplementation.Velocity;
quaternion IPlayerFixedPlace.FixedRotation => _playerFixedPlaceImplementation.FixedRotation;
float3 IPlayerFixedPlace.ExitPosition => _playerFixedPlaceImplementation.ExitPosition;
quaternion IPlayerFixedPlace.ExitRotation => _playerFixedPlaceImplementation.ExitRotation;
bool IPlayerFixedPlace.TryGetFixedEntity(out IEntity entity)
{
return _playerFixedPlaceImplementation.TryGetFixedEntity(out entity);
}
event Func<IEntity, bool> IPlayerFixedPlace.OnPlayerEntry
{
add => _playerFixedPlaceImplementation.OnPlayerEntry += value;
remove => _playerFixedPlaceImplementation.OnPlayerEntry -= value;
}
event Func<IEntity, bool> IPlayerFixedPlace.OnPlayerExit
{
add => _playerFixedPlaceImplementation.OnPlayerExit += value;
remove => _playerFixedPlaceImplementation.OnPlayerExit -= value;
}
event Action<IEntity> IPlayerFixedPlace.OnPlayerEntered
{
add => _playerFixedPlaceImplementation.OnPlayerEntered += value;
remove => _playerFixedPlaceImplementation.OnPlayerEntered -= value;
}
event Action<IEntity> IPlayerFixedPlace.OnPlayerExited
{
add => _playerFixedPlaceImplementation.OnPlayerExited += value;
remove => _playerFixedPlaceImplementation.OnPlayerExited -= value;
}
bool IPlayerFixedPlace.Entry(IEntity player)
{
return _playerFixedPlaceImplementation.Entry(player);
}
bool IPlayerFixedPlace.Exit(IEntity player)
{
return _playerFixedPlaceImplementation.Exit(player);
}
}
}

View File

@ -19,11 +19,13 @@ namespace BITFALL.Player.Survival
{
string Name { get; }
public float Value { get; set; }
public float Decay { get; }
event Action<float> OnValueChanged;
}
public abstract class PlayerSurvivalElement:IPlayerSurvivalElement{
public virtual string Name=>GetType().Name;
private float _value = 100;
public float Value {
get => _value;
set
@ -33,10 +35,19 @@ namespace BITFALL.Player.Survival
_value = value;
}
}
public virtual float Decay => 1;
public event Action<float> OnValueChanged;
}
[Serializable]
public sealed class PlayerSurvivalHunger:PlayerSurvivalElement{}
public sealed class PlayerSurvivalHunger : PlayerSurvivalElement
{
public override float Decay => 0.16f;
}
[Serializable]
public sealed class PlayerSurvivalThirst:PlayerSurvivalElement{}
public sealed class PlayerSurvivalThirst : PlayerSurvivalElement
{
public override float Decay => 0.32f;
}
}

View File

@ -53,8 +53,15 @@ namespace BITKit.Entities
{
await Task.Delay(10, destroyCancellationToken);
if (destroyCancellationToken.IsCancellationRequested) return;
rigidbodies.ForEach(x => { x.isKinematic = alive; });
ragdollColliders.ForEach(x => { x.enabled = !alive; });
foreach (var x in rigidbodies)
{
//x.isKinematic = alive;
x.gameObject.SetActive(!alive);
}
foreach (var x in ragdollColliders)
{
x.enabled = !alive;
}
OnSetPhysics?.Invoke(!alive);
}
catch (OperationCanceledException)

View File

@ -15,6 +15,7 @@ namespace NodeCanvas.Tasks.Actions
public BBParameter<GameObject> target;
public BBParameter<float> speed = 4;
public BBParameter<float> keepDistance = 0.1f;
public BBParameter<bool> waitUntilFinish = false;
private Vector3? lastRequest;
@ -29,16 +30,21 @@ namespace NodeCanvas.Tasks.Actions
EndAction(true);
return;
}
}
protected override void OnUpdate() {
if ( target.value == null ) { EndAction(false); return; }
var pos = target.value.transform.position;
if ( lastRequest != pos ) {
if ( !agent.SetDestination(pos) ) {
if (lastRequest != pos)
{
if (!agent.SetDestination(pos))
{
EndAction(false);
return;
}
if (waitUntilFinish.value == false)
EndAction(true);
}
lastRequest = pos;
@ -46,11 +52,13 @@ namespace NodeCanvas.Tasks.Actions
if ( !agent.pathPending && agent.remainingDistance <= agent.stoppingDistance + keepDistance.value ) {
EndAction(true);
}
}
protected override void OnPause() { OnStop(); }
protected override void OnStop() {
if ( agent.gameObject.activeSelf ) {
if ( agent.gameObject.activeSelf && agent.isOnNavMesh && waitUntilFinish.value) {
agent.ResetPath();
}
lastRequest = null;

View File

@ -58,7 +58,7 @@ namespace NodeCanvas.Tasks.Actions
protected override void OnPause() { OnStop(); }
protected override void OnStop() {
if ( agent.gameObject.activeSelf ) {
if ( agent.gameObject.activeSelf && agent.isOnNavMesh) {
agent.ResetPath();
}
}

View File

@ -23,7 +23,7 @@ namespace NodeCanvas.Tasks.Conditions
public BBParameter<float> viewAngle = 70f;
public Vector3 offset;
public Transform blockingObject;
public string report;
private RaycastHit hit;
@ -41,29 +41,46 @@ namespace NodeCanvas.Tasks.Conditions
if ( Vector3.Distance(agent.position, t.position) <= awarnessDistance.value ) {
if ( Physics.Linecast(agent.position + offset, t.position + offset, out hit, layerMask.value) ) {
blockingObject = hit.collider.transform;
if ( hit.collider != t.GetComponent<Collider>() ) {
return false;
report = hit.collider.name;
}
}
report = "Good Vigil Direct Hit";
return true;
}
if ( Vector3.Distance(agent.position, t.position) > maxDistance.value ) {
report = "Out of max distance";
return false;
}
if ( Vector3.Angle(t.position - agent.position, agent.forward) > viewAngle.value ) {
// if ( Vector3.Angle(t.position - agent.position, agent.forward) > viewAngle.value ) {
// report = "Out of view angle";
// return false;
// }
var direction = t.position - agent.position;
var dir = Quaternion.LookRotation(direction);
var angle = Quaternion.Angle(agent.rotation, dir);
if (Vector3.Dot(agent.forward, direction) > 0 && viewAngle.value > angle)
{
}
else
{
report = $"Out of view angle:{angle}";
return false;
}
if ( Physics.Linecast(agent.position + offset, t.position + offset, out hit, layerMask.value) ) {
blockingObject = hit.collider.transform;
if ( hit.collider != t.GetComponent<Collider>() ) {
report = hit.collider.name;
return false;
}
}
report = "Good Vigil";
return true;
}

View File

@ -18,7 +18,7 @@ PhysicsManager:
m_ClothInterCollisionDistance: 0.1
m_ClothInterCollisionStiffness: 0.2
m_ContactsGeneration: 1
m_LayerCollisionMatrix: 6965ff7f0800fe7f2800fe7fffffffff2800fe7f3d00fe7f49c0fe7f0800fe7f0949fe7f0800fe7f094cfe7f080dfe7f0800fe7f0920fe7f4945ff7f4800feff0940ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0880ff7f
m_LayerCollisionMatrix: 6965ff7f0800fe3f2800fe3fffffffff2800fe3f3d00fe3f49c0fe3f0800fe3f0949fe3f0800fe3f094cfe3f080dfe3f0800fe3f0920fe3f4945ff3f4800febf0940ffbfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0900feff0880ff7f
m_SimulationMode: 0
m_AutoSyncTransforms: 0
m_ReuseCollisionCallbacks: 1