diff --git a/Assets/Animation/SwordSwing.anim b/Assets/Animation/SwordSwing.anim index 44b04e79cca165c3135a19246752c6562f1ca13d..6d5d370e4ad5154f7f80b71156f44a5d6ffdbaf7 100644 --- a/Assets/Animation/SwordSwing.anim +++ b/Assets/Animation/SwordSwing.anim @@ -13,76 +13,8 @@ AnimationClip: m_UseHighQualityCurve: 1 m_RotationCurves: [] m_CompressedRotationCurves: [] - m_EulerCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -5.34, y: 0, z: -9.92} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.46666667 - value: {x: -84.2, y: -110.7, z: 2.1} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: -5.34, y: 0, z: -9.92} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: RightHand - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: 0.09, y: -0.13, z: 0.013} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.46666667 - value: {x: 0.09, y: -0.17, z: 0.013} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 1 - value: {x: 0.09, y: -0.13, z: 0.013} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: RightHand + m_EulerCurves: [] + m_PositionCurves: [] m_ScaleCurves: [] m_FloatCurves: [] m_PPtrCurves: [] @@ -92,25 +24,7 @@ AnimationClip: m_Center: {x: 0, y: 0, z: 0} m_Extent: {x: 0, y: 0, z: 0} m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 1979272496 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - isIntCurve: 0 - isSerializeReferenceCurve: 0 - - serializedVersion: 2 - path: 1979272496 - attribute: 4 - script: {fileID: 0} - typeID: 4 - customType: 4 - isPPtrCurve: 0 - isIntCurve: 0 - isSerializeReferenceCurve: 0 + genericBindings: [] pptrCurveMapping: [] m_AnimationClipSettings: serializedVersion: 2 @@ -132,260 +46,8 @@ AnimationClip: m_KeepOriginalPositionXZ: 0 m_HeightFromFeet: 0 m_Mirror: 0 - m_EditorCurves: - - serializedVersion: 2 - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0.09 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 0.09 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: RightHand - classID: 4 - script: {fileID: 0} - flags: 0 - - serializedVersion: 2 - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -0.13 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.46666667 - value: -0.17 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -0.13 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.y - path: RightHand - classID: 4 - script: {fileID: 0} - flags: 0 - - serializedVersion: 2 - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0.013 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 0.013 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: RightHand - classID: 4 - script: {fileID: 0} - flags: 0 - - serializedVersion: 2 - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -5.34 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.46666667 - value: -84.2 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -5.34 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: localEulerAnglesRaw.x - path: RightHand - classID: 4 - script: {fileID: 0} - flags: 0 - - serializedVersion: 2 - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.46666667 - value: -110.7 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: localEulerAnglesRaw.y - path: RightHand - classID: 4 - script: {fileID: 0} - flags: 0 - - serializedVersion: 2 - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -9.92 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.46666667 - value: 2.1 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: -9.92 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: localEulerAnglesRaw.z - path: RightHand - classID: 4 - script: {fileID: 0} - flags: 0 - m_EulerEditorCurves: - - serializedVersion: 2 - curve: - serializedVersion: 2 - m_Curve: [] - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalEulerAngles.x - path: RightHand - classID: 4 - script: {fileID: 0} - flags: 0 - - serializedVersion: 2 - curve: - serializedVersion: 2 - m_Curve: [] - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalEulerAngles.y - path: RightHand - classID: 4 - script: {fileID: 0} - flags: 0 - - serializedVersion: 2 - curve: - serializedVersion: 2 - m_Curve: [] - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalEulerAngles.z - path: RightHand - classID: 4 - script: {fileID: 0} - flags: 0 + m_EditorCurves: [] + m_EulerEditorCurves: [] m_HasGenericRootTransform: 0 m_HasMotionFloatCurves: 0 m_Events: [] diff --git a/Assets/Animation/sword point.controller b/Assets/Animation/sword point.controller new file mode 100644 index 0000000000000000000000000000000000000000..38c3f1ca01e302c1720f1f7246c773e4c0cfafe6 --- /dev/null +++ b/Assets/Animation/sword point.controller @@ -0,0 +1,12 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: sword point + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: [] diff --git a/Assets/Animation/sword point.controller.meta b/Assets/Animation/sword point.controller.meta new file mode 100644 index 0000000000000000000000000000000000000000..43f2a83654b7d8cd92c7ccc649c7d514e8a1311b --- /dev/null +++ b/Assets/Animation/sword point.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6573b1a46b132de4b97981fc4362867e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 9100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Player/Player.prefab b/Assets/Prefabs/Player/Player.prefab index 385f2ff5fd305796a53e9b975f491968df61fa0a..5176ebd296864c68872a40044780d633ebc83e21 100644 --- a/Assets/Prefabs/Player/Player.prefab +++ b/Assets/Prefabs/Player/Player.prefab @@ -151,6 +151,7 @@ MonoBehaviour: m_EditorClassIdentifier: camera: {fileID: 4007702334622639587} xSensitivity: 30 + joint: {fileID: 0} --- !u!114 &3685380106286336052 MonoBehaviour: m_ObjectHideFlags: 0 @@ -5725,14 +5726,14 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1173201642207969453} serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalRotation: {x: 0.085482955, y: 0.26862562, z: -0.63416946, w: -0.71997374} + m_LocalPosition: {x: -0.05348526, y: 0.09953043, z: -0.007831864} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: - {fileID: 7741384077319559111} - {fileID: 8556840527007043379} - m_Father: {fileID: 3012092206240433389} + m_Father: {fileID: 1256419198411177137} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &2977138485782000962 MonoBehaviour: @@ -7112,6 +7113,7 @@ Transform: - {fileID: 8527118315788936309} - {fileID: 9070266575381239687} - {fileID: 1199073455432382806} + - {fileID: 6956568164975881537} m_Father: {fileID: 3119095382694229713} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &3405555908406051188 @@ -7272,6 +7274,40 @@ Transform: m_Children: [] m_Father: {fileID: 4160102637162550722} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &3800475319379080896 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7309504134161503187} + m_Layer: 0 + m_Name: sword point + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7309504134161503187 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3800475319379080896} + serializedVersion: 2 + m_LocalRotation: {x: 0.000000044703487, y: 0.00000002019806, z: -0.0000000038053263, + w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1129536838893933469} + - {fileID: 3203592775059058920} + m_Father: {fileID: 1762508641954980733} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &3854663264587428308 GameObject: m_ObjectHideFlags: 0 @@ -7692,6 +7728,37 @@ Transform: - {fileID: 7703040536625527524} m_Father: {fileID: 1762508641954980733} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &5070273245029924728 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1129536838893933469} + m_Layer: 0 + m_Name: TargetRight + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1129536838893933469 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5070273245029924728} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -1.4745257e-17, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 7309504134161503187} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &5143535994161079547 GameObject: m_ObjectHideFlags: 0 @@ -7792,7 +7859,6 @@ Transform: m_ConstrainProportionsScale: 1 m_Children: - {fileID: 4653765559072431271} - - {fileID: 6956568164975881537} - {fileID: 6432097732635094937} - {fileID: 804848384132378636} m_Father: {fileID: 1199073455432382806} @@ -8407,6 +8473,37 @@ Transform: m_Children: [] m_Father: {fileID: 3012092206240433389} m_LocalEulerAnglesHint: {x: -0.1, y: -70.2, z: 45.3} +--- !u!1 &6147909412143035825 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3203592775059058920} + m_Layer: 0 + m_Name: TargetLeft + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3203592775059058920 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6147909412143035825} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -1.4745257e-17, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 7309504134161503187} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &6247721263744405403 GameObject: m_ObjectHideFlags: 0 @@ -19019,6 +19116,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 995001058696680214} + - {fileID: 7309504134161503187} m_Father: {fileID: 5145376001409546133} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &8514638539117560005 diff --git a/Assets/Script/Weapon/GunSystem.cs b/Assets/Script/Weapon/GunSystem.cs index 76a945372e29c510c0fc2e29b8c8a1552533dce6..e1905158c8463dd700c567f31e07d017da2aab7e 100644 --- a/Assets/Script/Weapon/GunSystem.cs +++ b/Assets/Script/Weapon/GunSystem.cs @@ -132,7 +132,8 @@ public class GunSystem : MonoBehaviour private void SwordAttack() { - gameObject.GetComponent<Animator>().SetTrigger("Swing"); + Debug.Log("SWING"); + GameObject.FindGameObjectWithTag("SwordPoint").GetComponent<Animator>().SetTrigger("Swing"); gameObject.GetComponent<Collider>().enabled = true; StartCoroutine(AttackFinished()); GlobalPreference.Instance.BulletShot(); diff --git a/Assets/Script/Weapon/Sword.cs b/Assets/Script/Weapon/Sword.cs index 3a889999fbe0654f347886a60537de905555e409..525f09d194a47d4183b8c1d85013e573678743e1 100644 --- a/Assets/Script/Weapon/Sword.cs +++ b/Assets/Script/Weapon/Sword.cs @@ -9,6 +9,7 @@ public class Sword : MonoBehaviour Debug.Log(collision.gameObject.name); if (collision.gameObject.CompareTag("Enemy")) { + Debug.Log("MUSUH"); int damage = gameObject.GetComponent<GunSystem>().damage; collision.gameObject.GetComponent<Enemy>().TakeDamage(damage); GlobalPreference.Instance.BulletHit(); diff --git a/Assets/Script/Weapon/WeaponManager.cs b/Assets/Script/Weapon/WeaponManager.cs index e1510c30a44e32c64cf540b728901d96afea05c1..33434aed8f0a4be081da858bbad1c95826819ebb 100644 --- a/Assets/Script/Weapon/WeaponManager.cs +++ b/Assets/Script/Weapon/WeaponManager.cs @@ -93,12 +93,12 @@ public class WeaponManager : MonoBehaviour if (index == 2) { player.GetComponent<RigBuilder>().enabled = true; - weapons[index].GetComponentInChildren<Rig>().enabled = true; + player.GetComponentInChildren<Rig>().enabled = true; } else { player.GetComponent<RigBuilder>().enabled= false; - weapons[2].GetComponentInChildren<Rig>().enabled = false; + player.GetComponentInChildren<Rig>().enabled = false; } currentWeapon = weapons[index]; currentWeaponName.SetText(currentWeapon.name);