From 928e4c61614c67432ea2ba1cded1992d0f5873be Mon Sep 17 00:00:00 2001 From: FitiLsan Date: Wed, 6 May 2020 23:34:37 +0300 Subject: [PATCH] Old scripts deleted --- Assets/Prefabs/Camera/AimingCameraSettings | 2 +- Assets/Prefabs/Camera/FreeLookCameraSettings | 2 +- Assets/Prefabs/Camera/TargetingCameraSettings | 2 +- Assets/Resources/Data/Weapons/Crossbow.asset | 12 ++- Assets/Scenes/BallistaTest/BallistaTest.unity | 82 +++++++++---------- .../StateMachine/States/IdleState.cs | 14 +++- .../States/MeleeAttackingState.cs | 2 +- .../StateMachine/States/MovementState.cs | 23 +++++- Assets/Scripts/Services/CameraService.cs | 6 ++ .../BurstAotSettings_StandaloneWindows.json | 16 ++++ .../BurstAotSettings_WSAPlayer.json | 13 +++ ProjectSettings/BurstAotSettings_WebGL.json | 13 +++ 12 files changed, 133 insertions(+), 54 deletions(-) create mode 100644 ProjectSettings/BurstAotSettings_StandaloneWindows.json create mode 100644 ProjectSettings/BurstAotSettings_WSAPlayer.json create mode 100644 ProjectSettings/BurstAotSettings_WebGL.json diff --git a/Assets/Prefabs/Camera/AimingCameraSettings b/Assets/Prefabs/Camera/AimingCameraSettings index bd260434b..dc0ee9c33 100644 --- a/Assets/Prefabs/Camera/AimingCameraSettings +++ b/Assets/Prefabs/Camera/AimingCameraSettings @@ -1 +1 @@ -{"m_ExcludedPropertiesInInspector":["m_Script"],"m_LockStageInInspector":[],"m_StreamingVersion":20170927,"m_Priority":0,"m_StandbyUpdate":2,"m_LookAt":{"instanceID":-78730},"m_Follow":{"instanceID":-78748},"m_Lens":{"FieldOfView":40.0,"OrthographicSize":10.0,"NearClipPlane":0.10000000149011612,"FarClipPlane":5000.0,"Dutch":0.0,"LensShift":{"x":0.0,"y":0.0}},"m_Transitions":{"m_BlendHint":0,"m_InheritPosition":false,"m_OnCameraLive":{"m_PersistentCalls":{"m_Calls":[]}}},"m_LegacyBlendHint":0,"m_ComponentOwner":{"instanceID":-78954}} \ No newline at end of file +{"m_ExcludedPropertiesInInspector":["m_Script"],"m_LockStageInInspector":[],"m_StreamingVersion":20170927,"m_Priority":0,"m_StandbyUpdate":2,"m_LookAt":{"instanceID":-130794},"m_Follow":{"instanceID":-130812},"m_Lens":{"FieldOfView":40.0,"OrthographicSize":10.0,"NearClipPlane":0.10000000149011612,"FarClipPlane":5000.0,"Dutch":0.0,"LensShift":{"x":0.0,"y":0.0}},"m_Transitions":{"m_BlendHint":0,"m_InheritPosition":false,"m_OnCameraLive":{"m_PersistentCalls":{"m_Calls":[]}}},"m_LegacyBlendHint":0,"m_ComponentOwner":{"instanceID":-131018}} \ No newline at end of file diff --git a/Assets/Prefabs/Camera/FreeLookCameraSettings b/Assets/Prefabs/Camera/FreeLookCameraSettings index 093009c1b..5d4bd5a4e 100644 --- a/Assets/Prefabs/Camera/FreeLookCameraSettings +++ b/Assets/Prefabs/Camera/FreeLookCameraSettings @@ -1 +1 @@ -{"m_ExcludedPropertiesInInspector":["m_Script"],"m_LockStageInInspector":[],"m_StreamingVersion":20170927,"m_Priority":1,"m_StandbyUpdate":0,"m_LookAt":{"instanceID":-78748},"m_Follow":{"instanceID":-78748},"m_CommonLens":true,"m_Lens":{"FieldOfView":40.0,"OrthographicSize":10.0,"NearClipPlane":0.10000000149011612,"FarClipPlane":5000.0,"Dutch":0.0,"LensShift":{"x":0.0,"y":0.0}},"m_Transitions":{"m_BlendHint":0,"m_InheritPosition":false,"m_OnCameraLive":{"m_PersistentCalls":{"m_Calls":[]}}},"m_LegacyBlendHint":0,"m_YAxis":{"Value":5.695676184825755e-20,"m_SpeedMode":0,"m_MaxSpeed":2.0,"m_AccelTime":0.20000000298023225,"m_DecelTime":0.10000000149011612,"m_InputAxisName":"Mouse Y","m_InputAxisValue":0.0,"m_InvertInput":true,"m_MinValue":0.0,"m_MaxValue":1.0,"m_Wrap":false,"m_Recentering":{"m_enabled":false,"m_WaitTime":1.0,"m_RecenteringTime":2.0,"m_LegacyHeadingDefinition":-1,"m_LegacyVelocityFilterStrength":-1}},"m_YAxisRecentering":{"m_enabled":true,"m_WaitTime":1.0,"m_RecenteringTime":2.0,"m_LegacyHeadingDefinition":-1,"m_LegacyVelocityFilterStrength":-1},"m_XAxis":{"Value":95.9837417602539,"m_SpeedMode":0,"m_MaxSpeed":400.0,"m_AccelTime":0.10000000149011612,"m_DecelTime":0.10000000149011612,"m_InputAxisName":"Mouse X","m_InputAxisValue":0.0,"m_InvertInput":false,"m_MinValue":-180.0,"m_MaxValue":180.0,"m_Wrap":true,"m_Recentering":{"m_enabled":false,"m_WaitTime":1.0,"m_RecenteringTime":2.0,"m_LegacyHeadingDefinition":-1,"m_LegacyVelocityFilterStrength":-1}},"m_Heading":{"m_Definition":2,"m_VelocityFilterStrength":4,"m_Bias":0.0},"m_RecenterToTargetHeading":{"m_enabled":false,"m_WaitTime":1.0,"m_RecenteringTime":0.0,"m_LegacyHeadingDefinition":-1,"m_LegacyVelocityFilterStrength":-1},"m_BindingMode":4,"m_SplineCurvature":0.20000000298023225,"m_Orbits":[{"m_Height":5.0,"m_Radius":3.0},{"m_Height":2.0,"m_Radius":5.0},{"m_Height":-1.0,"m_Radius":3.0}],"m_LegacyHeadingBias":3.4028234663852887e38,"m_Rigs":[{"instanceID":-78884},{"instanceID":-78900},{"instanceID":-78916}]} \ No newline at end of file +{"m_ExcludedPropertiesInInspector":["m_Script"],"m_LockStageInInspector":[],"m_StreamingVersion":20170927,"m_Priority":1,"m_StandbyUpdate":0,"m_LookAt":{"instanceID":-130812},"m_Follow":{"instanceID":-130812},"m_CommonLens":true,"m_Lens":{"FieldOfView":40.0,"OrthographicSize":10.0,"NearClipPlane":0.10000000149011612,"FarClipPlane":5000.0,"Dutch":0.0,"LensShift":{"x":0.0,"y":0.0}},"m_Transitions":{"m_BlendHint":0,"m_InheritPosition":false,"m_OnCameraLive":{"m_PersistentCalls":{"m_Calls":[]}}},"m_LegacyBlendHint":0,"m_YAxis":{"Value":4.2383021536807066e-7,"m_SpeedMode":0,"m_MaxSpeed":2.0,"m_AccelTime":0.20000000298023225,"m_DecelTime":0.10000000149011612,"m_InputAxisName":"Mouse Y","m_InputAxisValue":0.0,"m_InvertInput":true,"m_MinValue":0.0,"m_MaxValue":1.0,"m_Wrap":false,"m_Recentering":{"m_enabled":false,"m_WaitTime":1.0,"m_RecenteringTime":2.0,"m_LegacyHeadingDefinition":-1,"m_LegacyVelocityFilterStrength":-1}},"m_YAxisRecentering":{"m_enabled":true,"m_WaitTime":1.0,"m_RecenteringTime":2.0,"m_LegacyHeadingDefinition":-1,"m_LegacyVelocityFilterStrength":-1},"m_XAxis":{"Value":-53.56781768798828,"m_SpeedMode":0,"m_MaxSpeed":400.0,"m_AccelTime":0.10000000149011612,"m_DecelTime":0.10000000149011612,"m_InputAxisName":"Mouse X","m_InputAxisValue":0.0,"m_InvertInput":false,"m_MinValue":-180.0,"m_MaxValue":180.0,"m_Wrap":true,"m_Recentering":{"m_enabled":false,"m_WaitTime":1.0,"m_RecenteringTime":2.0,"m_LegacyHeadingDefinition":-1,"m_LegacyVelocityFilterStrength":-1}},"m_Heading":{"m_Definition":2,"m_VelocityFilterStrength":4,"m_Bias":0.0},"m_RecenterToTargetHeading":{"m_enabled":false,"m_WaitTime":1.0,"m_RecenteringTime":0.0,"m_LegacyHeadingDefinition":-1,"m_LegacyVelocityFilterStrength":-1},"m_BindingMode":4,"m_SplineCurvature":0.20000000298023225,"m_Orbits":[{"m_Height":5.0,"m_Radius":3.0},{"m_Height":2.0,"m_Radius":5.0},{"m_Height":-1.0,"m_Radius":3.0}],"m_LegacyHeadingBias":3.4028234663852887e38,"m_Rigs":[{"instanceID":-130948},{"instanceID":-130964},{"instanceID":-130980}]} \ No newline at end of file diff --git a/Assets/Prefabs/Camera/TargetingCameraSettings b/Assets/Prefabs/Camera/TargetingCameraSettings index 9576346e7..1f1a792c9 100644 --- a/Assets/Prefabs/Camera/TargetingCameraSettings +++ b/Assets/Prefabs/Camera/TargetingCameraSettings @@ -1 +1 @@ -{"m_ExcludedPropertiesInInspector":["m_Script"],"m_LockStageInInspector":[],"m_StreamingVersion":20170927,"m_Priority":0,"m_StandbyUpdate":2,"m_LookAt":{"instanceID":-78748},"m_Follow":{"instanceID":-78748},"m_Lens":{"FieldOfView":40.0,"OrthographicSize":10.0,"NearClipPlane":0.10000000149011612,"FarClipPlane":5000.0,"Dutch":0.0,"LensShift":{"x":0.0,"y":0.0}},"m_Transitions":{"m_BlendHint":0,"m_InheritPosition":false,"m_OnCameraLive":{"m_PersistentCalls":{"m_Calls":[]}}},"m_LegacyBlendHint":0,"m_ComponentOwner":{"instanceID":-78936}} \ No newline at end of file +{"m_ExcludedPropertiesInInspector":["m_Script"],"m_LockStageInInspector":[],"m_StreamingVersion":20170927,"m_Priority":0,"m_StandbyUpdate":2,"m_LookAt":{"instanceID":-130812},"m_Follow":{"instanceID":-130812},"m_Lens":{"FieldOfView":40.0,"OrthographicSize":10.0,"NearClipPlane":0.10000000149011612,"FarClipPlane":5000.0,"Dutch":0.0,"LensShift":{"x":0.0,"y":0.0}},"m_Transitions":{"m_BlendHint":0,"m_InheritPosition":false,"m_OnCameraLive":{"m_PersistentCalls":{"m_Calls":[]}}},"m_LegacyBlendHint":0,"m_ComponentOwner":{"instanceID":-131000}} \ No newline at end of file diff --git a/Assets/Resources/Data/Weapons/Crossbow.asset b/Assets/Resources/Data/Weapons/Crossbow.asset index 40536f14d..7c32f0da0 100644 --- a/Assets/Resources/Data/Weapons/Crossbow.asset +++ b/Assets/Resources/Data/Weapons/Crossbow.asset @@ -26,13 +26,19 @@ MonoBehaviour: _volume: 0 _pitch: 0 _doLoop: 0 + _weaponDamage: + PhysicalDamageType: 0 + PhysicalDamageValue: 0 + ElementDamageType: 0 + ElementDamageValue: 0 _simpleAttacks: - Name: Simple shot AnimationName: Shoot AttackDamage: - PhysicalDamage: 3 - StunProbability: 0 - FireDamage: 0 + PhysicalDamageType: 0 + PhysicalDamageValue: 0 + ElementDamageType: 0 + ElementDamageValue: 0 WeaponItem: {fileID: 11400000, guid: e2a1624ec5a336945b8c75bb80548e57, type: 2} AttackType: 3 AttackTime: 0.5 diff --git a/Assets/Scenes/BallistaTest/BallistaTest.unity b/Assets/Scenes/BallistaTest/BallistaTest.unity index 067a6ad4b..a1c9b32bb 100644 --- a/Assets/Scenes/BallistaTest/BallistaTest.unity +++ b/Assets/Scenes/BallistaTest/BallistaTest.unity @@ -151,7 +151,7 @@ Rigidbody: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 85981381} serializedVersion: 2 - m_Mass: 1 + m_Mass: 20 m_Drag: 0 m_AngularDrag: 0.05 m_UseGravity: 1 @@ -229,7 +229,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 85981381} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 406.89996, y: 89.458, z: 161.74326} + m_LocalPosition: {x: 248.18, y: 89.458, z: 236.91} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1263035631} @@ -340,7 +340,7 @@ Rigidbody: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 440668077} serializedVersion: 2 - m_Mass: 1 + m_Mass: 25 m_Drag: 0 m_AngularDrag: 0.05 m_UseGravity: 1 @@ -418,7 +418,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 440668077} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 406.9, y: 85.32, z: 160.7} + m_LocalPosition: {x: 248.18004, y: 85.32, z: 235.86674} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1263035631} @@ -453,7 +453,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 661241310} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 394.9, y: 94.96854, z: 173.66} + m_LocalPosition: {x: 236.18004, y: 94.96854, z: 248.82675} m_LocalScale: {x: 0.074896544, y: 0.074896544, z: 0.074896544} m_Children: [] m_Father: {fileID: 933622906} @@ -650,7 +650,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 738121858} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 401.97366, y: 86.43218, z: 169.23924} + m_LocalPosition: {x: 243.25371, y: 86.43218, z: 244.40599} m_LocalScale: {x: 29.489779, y: 1.0908, z: 31.338684} m_Children: [] m_Father: {fileID: 0} @@ -684,7 +684,7 @@ Rigidbody: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 750658302} serializedVersion: 2 - m_Mass: 1 + m_Mass: 25 m_Drag: 0 m_AngularDrag: 0.05 m_UseGravity: 1 @@ -762,7 +762,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 750658302} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 406.89996, y: 90.498, z: 160.7165} + m_LocalPosition: {x: 248.18001, y: 90.498, z: 235.88326} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1263035631} @@ -796,7 +796,7 @@ Rigidbody: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 809428659} serializedVersion: 2 - m_Mass: 1 + m_Mass: 25 m_Drag: 0 m_AngularDrag: 0.05 m_UseGravity: 1 @@ -874,7 +874,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 809428659} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 406.89996, y: 87.39, z: 161.74326} + m_LocalPosition: {x: 248.18001, y: 87.39, z: 236.91} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1263035631} @@ -908,7 +908,7 @@ Rigidbody: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 825649073} serializedVersion: 2 - m_Mass: 1 + m_Mass: 25 m_Drag: 0 m_AngularDrag: 0.05 m_UseGravity: 1 @@ -986,7 +986,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 825649073} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 406.89996, y: 89.458, z: 160.7165} + m_LocalPosition: {x: 248.18001, y: 89.458, z: 235.88326} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1263035631} @@ -1020,7 +1020,7 @@ Rigidbody: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 910572627} serializedVersion: 2 - m_Mass: 1 + m_Mass: 25 m_Drag: 0 m_AngularDrag: 0.05 m_UseGravity: 1 @@ -1098,7 +1098,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 910572627} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 406.89996, y: 87.39, z: 160.7165} + m_LocalPosition: {x: 248.18001, y: 87.39, z: 235.88326} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1263035631} @@ -1132,7 +1132,7 @@ Rigidbody: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 919810211} serializedVersion: 2 - m_Mass: 1 + m_Mass: 25 m_Drag: 0 m_AngularDrag: 0.05 m_UseGravity: 1 @@ -1210,7 +1210,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 919810211} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 406.89996, y: 90.498, z: 161.74326} + m_LocalPosition: {x: 248.18001, y: 90.498, z: 236.91} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1263035631} @@ -1280,7 +1280,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 980108370} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 394.9, y: 94.79753, z: 173.66} + m_LocalPosition: {x: 236.18004, y: 94.79753, z: 248.82675} m_LocalScale: {x: 0.074896544, y: 0.074896544, z: 0.074896544} m_Children: [] m_Father: {fileID: 933622906} @@ -1467,7 +1467,7 @@ Rigidbody: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1042864923} serializedVersion: 2 - m_Mass: 1 + m_Mass: 25 m_Drag: 0 m_AngularDrag: 0.05 m_UseGravity: 1 @@ -1545,7 +1545,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1042864923} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 406.89996, y: 86.36, z: 160.7} + m_LocalPosition: {x: 248.18001, y: 86.36, z: 235.86674} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1263035631} @@ -1698,7 +1698,7 @@ Rigidbody: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1206674937} serializedVersion: 2 - m_Mass: 1 + m_Mass: 25 m_Drag: 0 m_AngularDrag: 0.05 m_UseGravity: 1 @@ -1776,7 +1776,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1206674937} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 406.89996, y: 85.32, z: 162.77} + m_LocalPosition: {x: 248.18001, y: 85.32, z: 237.93675} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1263035631} @@ -1959,7 +1959,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1233437364} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 390.45, y: 88.2, z: 156.65} + m_LocalPosition: {x: 231.73006, y: 88.2, z: 231.81674} m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} m_Children: - {fileID: 1832892495} @@ -2056,7 +2056,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1283673699} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 394.9, y: 95.052536, z: 173.66} + m_LocalPosition: {x: 236.18004, y: 95.052536, z: 248.82675} m_LocalScale: {x: 0.074896544, y: 0.074896544, z: 0.074896544} m_Children: [] m_Father: {fileID: 933622906} @@ -2073,7 +2073,7 @@ SpringJoint: m_ConnectedArticulationBody: {fileID: 0} m_Anchor: {x: 0, y: 0.5, z: 0} m_AutoConfigureConnectedAnchor: 1 - m_ConnectedAnchor: {x: 389.577, y: 90.29998, z: 156.33} + m_ConnectedAnchor: {x: 230.85704, y: 90.29998, z: 231.49675} serializedVersion: 2 m_Spring: 10 m_Damper: 0.2 @@ -2253,7 +2253,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1323643721} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 412.27365, y: 92.04, z: 165.07924} + m_LocalPosition: {x: 253.5537, y: 92.04, z: 240.24599} m_LocalScale: {x: 1, y: 10, z: 10} m_Children: [] m_Father: {fileID: 0} @@ -2287,7 +2287,7 @@ Rigidbody: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1383826894} serializedVersion: 2 - m_Mass: 1 + m_Mass: 25 m_Drag: 0 m_AngularDrag: 0.05 m_UseGravity: 1 @@ -2365,7 +2365,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1383826894} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 406.89996, y: 88.43, z: 161.74326} + m_LocalPosition: {x: 248.18001, y: 88.43, z: 236.91} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1263035631} @@ -2493,7 +2493,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1408320114} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 394.9, y: 94.88454, z: 173.66} + m_LocalPosition: {x: 236.18004, y: 94.88454, z: 248.82675} m_LocalScale: {x: 0.074896544, y: 0.074896544, z: 0.074896544} m_Children: [] m_Father: {fileID: 933622906} @@ -2629,7 +2629,7 @@ Rigidbody: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1482796277} serializedVersion: 2 - m_Mass: 1 + m_Mass: 25 m_Drag: 0 m_AngularDrag: 0.05 m_UseGravity: 1 @@ -2707,7 +2707,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1482796277} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 406.89996, y: 85.32, z: 161.74326} + m_LocalPosition: {x: 248.18001, y: 85.32, z: 236.91} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1263035631} @@ -2742,7 +2742,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1503305674} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 394.9, y: 94.71, z: 173.66} + m_LocalPosition: {x: 236.18004, y: 94.71, z: 248.82675} m_LocalScale: {x: 0.074896544, y: 0.074896544, z: 0.074896544} m_Children: [] m_Father: {fileID: 933622906} @@ -2878,7 +2878,7 @@ Rigidbody: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1742413361} serializedVersion: 2 - m_Mass: 1 + m_Mass: 25 m_Drag: 0 m_AngularDrag: 0.05 m_UseGravity: 1 @@ -2956,7 +2956,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1742413361} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 406.89996, y: 86.36, z: 162.77} + m_LocalPosition: {x: 248.18001, y: 86.36, z: 237.93675} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1263035631} @@ -3041,7 +3041,7 @@ Rigidbody: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1837894200} serializedVersion: 2 - m_Mass: 1 + m_Mass: 25 m_Drag: 0 m_AngularDrag: 0.05 m_UseGravity: 1 @@ -3119,7 +3119,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1837894200} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 406.89996, y: 86.36, z: 161.74326} + m_LocalPosition: {x: 248.18001, y: 86.36, z: 236.91} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1263035631} @@ -3153,7 +3153,7 @@ Rigidbody: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1843202012} serializedVersion: 2 - m_Mass: 1 + m_Mass: 25 m_Drag: 0 m_AngularDrag: 0.05 m_UseGravity: 1 @@ -3231,7 +3231,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1843202012} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 406.89996, y: 85.32, z: 159.67325} + m_LocalPosition: {x: 248.18001, y: 85.32, z: 234.84} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1263035631} @@ -3265,7 +3265,7 @@ Rigidbody: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1926310246} serializedVersion: 2 - m_Mass: 1 + m_Mass: 25 m_Drag: 0 m_AngularDrag: 0.05 m_UseGravity: 1 @@ -3343,7 +3343,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1926310246} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 406.89996, y: 86.36, z: 159.67325} + m_LocalPosition: {x: 248.18001, y: 86.36, z: 234.84} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1263035631} @@ -3377,7 +3377,7 @@ Rigidbody: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2066154115} serializedVersion: 2 - m_Mass: 1 + m_Mass: 25 m_Drag: 0 m_AngularDrag: 0.05 m_UseGravity: 1 @@ -3455,7 +3455,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2066154115} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 406.89996, y: 88.43, z: 160.7165} + m_LocalPosition: {x: 248.18001, y: 88.43, z: 235.88326} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1263035631} diff --git a/Assets/Scripts/Controllers/Character/StateMachine/States/IdleState.cs b/Assets/Scripts/Controllers/Character/StateMachine/States/IdleState.cs index 901fbe3b0..f35858141 100644 --- a/Assets/Scripts/Controllers/Character/StateMachine/States/IdleState.cs +++ b/Assets/Scripts/Controllers/Character/StateMachine/States/IdleState.cs @@ -28,8 +28,18 @@ protected override void EnableActions() SetState(_stateMachine.CharacterStates[CharacterStatesEnum.Movement]); _inputModel.OnSneakSlide += () => _stateMachine. SetState(_stateMachine.CharacterStates[CharacterStatesEnum.Sneaking]); - _inputModel.OnAttack += () => _stateMachine. - SetState(_stateMachine.CharacterStates[CharacterStatesEnum.Attacking]); + if (_characterModel.CurrentWeaponData.Value != null) + { + if (_characterModel.CurrentWeaponData.Value.Type == WeaponType.Shooting) + { + _inputModel.OnAttack += () => _stateMachine.SetState(_stateMachine.CharacterStates[CharacterStatesEnum.Shooting]); + } + else + { + _inputModel.OnAttack += () => _stateMachine.SetState(_stateMachine.CharacterStates[CharacterStatesEnum.Attacking]); + } + } + _inputModel.OnJump += () => _stateMachine. SetState(_stateMachine.CharacterStates[CharacterStatesEnum.Jumping]); _inputModel.OnAim += () => _stateMachine. diff --git a/Assets/Scripts/Controllers/Character/StateMachine/States/MeleeAttackingState.cs b/Assets/Scripts/Controllers/Character/StateMachine/States/MeleeAttackingState.cs index 2d8ff88cb..20e62c00f 100644 --- a/Assets/Scripts/Controllers/Character/StateMachine/States/MeleeAttackingState.cs +++ b/Assets/Scripts/Controllers/Character/StateMachine/States/MeleeAttackingState.cs @@ -39,7 +39,7 @@ public void Updating() public override bool CanBeActivated() { - if(!_characterModel.IsWeaponInHands && _characterModel.CurrentPlacingTrapModel.Value != null) + if (!_characterModel.IsWeaponInHands && _characterModel.CurrentPlacingTrapModel.Value != null) { _stateMachine.SetState(_stateMachine.CharacterStates[CharacterStatesEnum.TrapPlacing]); } diff --git a/Assets/Scripts/Controllers/Character/StateMachine/States/MovementState.cs b/Assets/Scripts/Controllers/Character/StateMachine/States/MovementState.cs index 49d90408f..9e64e2a7b 100644 --- a/Assets/Scripts/Controllers/Character/StateMachine/States/MovementState.cs +++ b/Assets/Scripts/Controllers/Character/StateMachine/States/MovementState.cs @@ -50,8 +50,17 @@ protected override void EnableActions() _inputModel.OnStop += StartCountExitTime; _inputModel.OnMove += StopCountExitTime; _inputModel.OnSneakSlide += () => SneakOrSlide(); - _inputModel.OnAttack += () => _stateMachine. - SetState(_stateMachine.CharacterStates[CharacterStatesEnum.Attacking]); + if (_characterModel.CurrentWeaponData.Value != null) + { + if (_characterModel.CurrentWeaponData.Value.Type == WeaponType.Shooting) + { + _inputModel.OnAttack += () => _stateMachine.SetState(_stateMachine.CharacterStates[CharacterStatesEnum.Shooting]); + } + else + { + _inputModel.OnAttack += () => _stateMachine.SetState(_stateMachine.CharacterStates[CharacterStatesEnum.Attacking]); + } + } _inputModel.OnJump += () => _stateMachine. SetState(_stateMachine.CharacterStates[CharacterStatesEnum.Jumping]); _inputModel.OnAim += () => _stateMachine. @@ -104,12 +113,18 @@ private void CountExitTime() private void StartCountExitTime() { - IsStopping = true; + if (_characterModel.CurrentWeaponData.Value != null && _characterModel.CurrentWeaponData.Value.Type == WeaponType.Shooting) { + IsStopping = false; + } + else + { + IsStopping = true; + } } private void StopCountExitTime() { - IsStopping = false; + IsStopping = false; ExitTime = _characterModel.CharacterData.CharacterCommonSettings.TImeToContinueMovingAfterStop; } diff --git a/Assets/Scripts/Services/CameraService.cs b/Assets/Scripts/Services/CameraService.cs index 9de9b4315..9cd8527b4 100644 --- a/Assets/Scripts/Services/CameraService.cs +++ b/Assets/Scripts/Services/CameraService.cs @@ -208,6 +208,12 @@ private void UpdateCameraForCharacterState(CharacterBaseState currentState) SetBlendTime(_cameraData.CharacterFreelookCameraSettings.CharacterFreelookCameraBlendTime); SetActiveCamera(CharacterFreelookCamera); break; + case CharacterStatesEnum.Shooting: + CenterCameraTarget(); + SetBlendTime(_cameraData.CharacterAimingCameraSettings.CharacterAimingCameraBlendTIme); + SetActiveCamera(CharacterFreelookCamera); + GetWeaponShootTransform(); + break; default: break; } diff --git a/ProjectSettings/BurstAotSettings_StandaloneWindows.json b/ProjectSettings/BurstAotSettings_StandaloneWindows.json new file mode 100644 index 000000000..2144f6dc7 --- /dev/null +++ b/ProjectSettings/BurstAotSettings_StandaloneWindows.json @@ -0,0 +1,16 @@ +{ + "MonoBehaviour": { + "Version": 3, + "EnableBurstCompilation": true, + "EnableOptimisations": true, + "EnableSafetyChecks": false, + "EnableDebugInAllBuilds": false, + "UsePlatformSDKLinker": false, + "CpuMinTargetX32": 0, + "CpuMaxTargetX32": 0, + "CpuMinTargetX64": 0, + "CpuMaxTargetX64": 0, + "CpuTargetsX32": 6, + "CpuTargetsX64": 72 + } +} diff --git a/ProjectSettings/BurstAotSettings_WSAPlayer.json b/ProjectSettings/BurstAotSettings_WSAPlayer.json new file mode 100644 index 000000000..751473f15 --- /dev/null +++ b/ProjectSettings/BurstAotSettings_WSAPlayer.json @@ -0,0 +1,13 @@ +{ + "MonoBehaviour": { + "Version": 3, + "EnableBurstCompilation": true, + "EnableOptimisations": true, + "EnableSafetyChecks": false, + "EnableDebugInAllBuilds": false, + "CpuMinTargetX32": 0, + "CpuMaxTargetX32": 0, + "CpuMinTargetX64": 0, + "CpuMaxTargetX64": 0 + } +} diff --git a/ProjectSettings/BurstAotSettings_WebGL.json b/ProjectSettings/BurstAotSettings_WebGL.json new file mode 100644 index 000000000..751473f15 --- /dev/null +++ b/ProjectSettings/BurstAotSettings_WebGL.json @@ -0,0 +1,13 @@ +{ + "MonoBehaviour": { + "Version": 3, + "EnableBurstCompilation": true, + "EnableOptimisations": true, + "EnableSafetyChecks": false, + "EnableDebugInAllBuilds": false, + "CpuMinTargetX32": 0, + "CpuMaxTargetX32": 0, + "CpuMinTargetX64": 0, + "CpuMaxTargetX64": 0 + } +}