diff --git a/Assets/Resources/1/VFX/Bonus/Attack/Stake/Stake.prefab b/Assets/Resources/1/VFX/Bonus/Attack/Stake/Stake.prefab index 3d9c5a9f..a77cc797 100644 --- a/Assets/Resources/1/VFX/Bonus/Attack/Stake/Stake.prefab +++ b/Assets/Resources/1/VFX/Bonus/Attack/Stake/Stake.prefab @@ -11,6 +11,7 @@ GameObject: - component: {fileID: 8496353649581852521} - component: {fileID: 4775723488397002956} - component: {fileID: 7323469254759840774} + - component: {fileID: -6185193896607566498} m_Layer: 0 m_Name: Stake m_TagString: Untagged @@ -88,6 +89,21 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} +--- !u!114 &-6185193896607566498 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9125080148727291347} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e951bed62e4063d40a1d67d75554b062, type: 3} + m_Name: + m_EditorClassIdentifier: + instanceDamage: 10 + timingDamage: 5 + time: 3 --- !u!1001 &5507685542420688607 PrefabInstance: m_ObjectHideFlags: 0 @@ -95,83 +111,67 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 8496353649581852521} m_Modifications: - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_RootOrder value: 3 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalScale.x value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalScale.y value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalScale.z value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalPosition.x value: 0.63560295 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalPosition.z value: 0.43780622 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: -7511558181221131132, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -7511558181221131132, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: d9af6ef07cb7bf64cb1b49fb35307f7e, type: 2} - - target: {fileID: 919132149155446097, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: 919132149155446097, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_Name value: Stake objectReference: {fileID: 0} @@ -179,8 +179,7 @@ PrefabInstance: m_SourcePrefab: {fileID: 100100000, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} --- !u!4 &5468922099889817908 stripped Transform: - m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} m_PrefabInstance: {fileID: 5507685542420688607} m_PrefabAsset: {fileID: 0} --- !u!1001 &6106979992260874016 @@ -190,83 +189,67 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 8496353649581852521} m_Modifications: - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_RootOrder value: 4 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalScale.x value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalScale.y value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalScale.z value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalPosition.x value: 0.63560295 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalPosition.z value: -0.43780622 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: -7511558181221131132, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -7511558181221131132, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: d9af6ef07cb7bf64cb1b49fb35307f7e, type: 2} - - target: {fileID: 919132149155446097, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: 919132149155446097, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_Name value: Stake objectReference: {fileID: 0} @@ -274,8 +257,7 @@ PrefabInstance: m_SourcePrefab: {fileID: 100100000, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} --- !u!4 &6001856358739994827 stripped Transform: - m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} m_PrefabInstance: {fileID: 6106979992260874016} m_PrefabAsset: {fileID: 0} --- !u!1001 &6725779859084902877 @@ -285,83 +267,67 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 8496353649581852521} m_Modifications: - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_RootOrder value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalScale.x value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalScale.y value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalScale.z value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalPosition.x value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalPosition.z value: -0.75500464 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: -7511558181221131132, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -7511558181221131132, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: d9af6ef07cb7bf64cb1b49fb35307f7e, type: 2} - - target: {fileID: 919132149155446097, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: 919132149155446097, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_Name value: Stake objectReference: {fileID: 0} @@ -369,8 +335,7 @@ PrefabInstance: m_SourcePrefab: {fileID: 100100000, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} --- !u!4 &6547244679254435382 stripped Transform: - m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} m_PrefabInstance: {fileID: 6725779859084902877} m_PrefabAsset: {fileID: 0} --- !u!1001 &7281844180473446107 @@ -380,83 +345,67 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 8496353649581852521} m_Modifications: - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_RootOrder value: 2 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalScale.x value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalScale.y value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalScale.z value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalPosition.x value: -0.63560295 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalPosition.z value: 0.43780622 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: -7511558181221131132, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -7511558181221131132, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: d9af6ef07cb7bf64cb1b49fb35307f7e, type: 2} - - target: {fileID: 919132149155446097, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: 919132149155446097, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_Name value: Stake objectReference: {fileID: 0} @@ -464,8 +413,7 @@ PrefabInstance: m_SourcePrefab: {fileID: 100100000, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} --- !u!4 &7099071380945115440 stripped Transform: - m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} m_PrefabInstance: {fileID: 7281844180473446107} m_PrefabAsset: {fileID: 0} --- !u!1001 &8469668352806300657 @@ -475,83 +423,67 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 8496353649581852521} m_Modifications: - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_RootOrder value: 5 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalScale.x value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalScale.y value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalScale.z value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalPosition.x value: -0.63560295 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalPosition.z value: -0.43780622 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: -7511558181221131132, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -7511558181221131132, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: d9af6ef07cb7bf64cb1b49fb35307f7e, type: 2} - - target: {fileID: 919132149155446097, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: 919132149155446097, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_Name value: Stake objectReference: {fileID: 0} @@ -559,8 +491,7 @@ PrefabInstance: m_SourcePrefab: {fileID: 100100000, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} --- !u!4 &8214837314205928474 stripped Transform: - m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} m_PrefabInstance: {fileID: 8469668352806300657} m_PrefabAsset: {fileID: 0} --- !u!1001 &8478151692175376759 @@ -570,108 +501,87 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 8496353649581852521} m_Modifications: - - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - type: 3} + - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3} propertyPath: m_RootOrder value: 6 objectReference: {fileID: 0} - - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - type: 3} + - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3} propertyPath: m_LocalScale.x value: 0.73732454 objectReference: {fileID: 0} - - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - type: 3} + - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3} propertyPath: m_LocalScale.y value: 0.73732454 objectReference: {fileID: 0} - - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - type: 3} + - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3} propertyPath: m_LocalScale.z value: 0.73732454 objectReference: {fileID: 0} - - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - type: 3} + - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3} propertyPath: m_LocalPosition.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - type: 3} + - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3} propertyPath: m_LocalPosition.y value: 0.012060776 objectReference: {fileID: 0} - - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - type: 3} + - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - type: 3} + - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - type: 3} + - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - type: 3} + - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3} propertyPath: m_LocalRotation.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - type: 3} + - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - type: 3} + - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - type: 3} + - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - type: 3} + - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 5327400453591714386, guid: 04efd775509c00144993f7b46ecc2812, - type: 3} + - target: {fileID: 5327400453591714386, guid: 04efd775509c00144993f7b46ecc2812, type: 3} propertyPath: m_Name value: OpponentAura objectReference: {fileID: 0} - - target: {fileID: 5327400453610800772, guid: 04efd775509c00144993f7b46ecc2812, - type: 3} + - target: {fileID: 5327400453610800772, guid: 04efd775509c00144993f7b46ecc2812, type: 3} propertyPath: InitialModule.startColor.maxColor.a value: 0.5372549 objectReference: {fileID: 0} - - target: {fileID: 5327400453610800772, guid: 04efd775509c00144993f7b46ecc2812, - type: 3} + - target: {fileID: 5327400453610800772, guid: 04efd775509c00144993f7b46ecc2812, type: 3} propertyPath: InitialModule.startColor.maxColor.b value: 0.84019756 objectReference: {fileID: 0} - - target: {fileID: 5327400453610800772, guid: 04efd775509c00144993f7b46ecc2812, - type: 3} + - target: {fileID: 5327400453610800772, guid: 04efd775509c00144993f7b46ecc2812, type: 3} propertyPath: InitialModule.startColor.maxColor.r value: 1 objectReference: {fileID: 0} - - target: {fileID: 5327400453610810510, guid: 04efd775509c00144993f7b46ecc2812, - type: 3} + - target: {fileID: 5327400453610810510, guid: 04efd775509c00144993f7b46ecc2812, type: 3} propertyPath: InitialModule.startColor.maxColor.a value: 0.1764706 objectReference: {fileID: 0} - - target: {fileID: 5327400453610810510, guid: 04efd775509c00144993f7b46ecc2812, - type: 3} + - target: {fileID: 5327400453610810510, guid: 04efd775509c00144993f7b46ecc2812, type: 3} propertyPath: InitialModule.startColor.maxColor.b value: 0.77448034 objectReference: {fileID: 0} - - target: {fileID: 5327400453610883902, guid: 04efd775509c00144993f7b46ecc2812, - type: 3} + - target: {fileID: 5327400453610883902, guid: 04efd775509c00144993f7b46ecc2812, type: 3} propertyPath: InitialModule.startColor.maxColor.b value: 0.94541836 objectReference: {fileID: 0} @@ -679,8 +589,7 @@ PrefabInstance: m_SourcePrefab: {fileID: 100100000, guid: 04efd775509c00144993f7b46ecc2812, type: 3} --- !u!4 &4343379307954862499 stripped Transform: - m_CorrespondingSourceObject: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - type: 3} + m_CorrespondingSourceObject: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3} m_PrefabInstance: {fileID: 8478151692175376759} m_PrefabAsset: {fileID: 0} --- !u!1001 &8481238872751102925 @@ -690,83 +599,67 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 8496353649581852521} m_Modifications: - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_RootOrder value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalScale.x value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalScale.y value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalScale.z value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalPosition.x value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalPosition.z value: 0.75500464 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: -7511558181221131132, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: -7511558181221131132, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_Materials.Array.data[0] value: objectReference: {fileID: 2100000, guid: d9af6ef07cb7bf64cb1b49fb35307f7e, type: 2} - - target: {fileID: 919132149155446097, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + - target: {fileID: 919132149155446097, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} propertyPath: m_Name value: Stake objectReference: {fileID: 0} @@ -774,7 +667,6 @@ PrefabInstance: m_SourcePrefab: {fileID: 100100000, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} --- !u!4 &8230839234490874918 stripped Transform: - m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - type: 3} + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} m_PrefabInstance: {fileID: 8481238872751102925} m_PrefabAsset: {fileID: 0} diff --git a/Assets/Resources/Data/Items/InfiniteMana.asset b/Assets/Resources/Data/Items/InfiniteMana.asset new file mode 100644 index 00000000..0e33b12b --- /dev/null +++ b/Assets/Resources/Data/Items/InfiniteMana.asset @@ -0,0 +1,20 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2b016eba27de41629261b965b3e2be0c, type: 3} + m_Name: InfiniteMana + m_EditorClassIdentifier: + icon: {fileID: 21300000, guid: 0bfefb2488410ee4280a7ab249df5ede, type: 3} + type: 0 + duration: 3 + value: 0 + bonusType: 4 + usisngVFX: {fileID: 4395835106571359517, guid: eb6e00f115952254aa757388a1398342, type: 3} diff --git a/Assets/Resources/Data/Items/InfiniteMana.asset.meta b/Assets/Resources/Data/Items/InfiniteMana.asset.meta new file mode 100644 index 00000000..ed9ffb75 --- /dev/null +++ b/Assets/Resources/Data/Items/InfiniteMana.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 99c322c98b2d2eb4a8af928bb6469294 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Data/Items/Magnet.asset b/Assets/Resources/Data/Items/Magnet.asset new file mode 100644 index 00000000..2f36f48d --- /dev/null +++ b/Assets/Resources/Data/Items/Magnet.asset @@ -0,0 +1,20 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2b016eba27de41629261b965b3e2be0c, type: 3} + m_Name: Magnet + m_EditorClassIdentifier: + icon: {fileID: 21300000, guid: f353a9532d1574046a3b79c338fafa65, type: 3} + type: 1 + duration: 4 + value: 4 + bonusType: 3 + usisngVFX: {fileID: 0} diff --git a/Assets/Resources/Data/Items/Magnet.asset.meta b/Assets/Resources/Data/Items/Magnet.asset.meta new file mode 100644 index 00000000..b2ce6901 --- /dev/null +++ b/Assets/Resources/Data/Items/Magnet.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9aa9a56650b87d54ea46a1c7ab78bf74 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Data/Items/Stake.asset b/Assets/Resources/Data/Items/Stake.asset new file mode 100644 index 00000000..e6ad9a20 --- /dev/null +++ b/Assets/Resources/Data/Items/Stake.asset @@ -0,0 +1,17 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f23a091c5733400f8f0092a4c0f33c6e, type: 3} + m_Name: Stake + m_EditorClassIdentifier: + icon: {fileID: 21300000, guid: c455216bc89f6c54d90211b86a5cf0e6, type: 3} + type: 0 + buildingPrefab: {fileID: 9125080148727291347, guid: 5663dbcf605325241b40bc2afd5b6647, type: 3} diff --git a/Assets/Resources/Data/Items/Stake.asset.meta b/Assets/Resources/Data/Items/Stake.asset.meta new file mode 100644 index 00000000..581755f4 --- /dev/null +++ b/Assets/Resources/Data/Items/Stake.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e32a04374dd43c34b8d0449d54fa1f19 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Data/Items/SwitchingPlaces.asset b/Assets/Resources/Data/Items/SwitchingPlaces.asset index b7bc4862..6b69b34c 100644 --- a/Assets/Resources/Data/Items/SwitchingPlaces.asset +++ b/Assets/Resources/Data/Items/SwitchingPlaces.asset @@ -12,6 +12,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f9d99aa6a656431c98bbf98460ff38a1, type: 3} m_Name: SwitchingPlaces m_EditorClassIdentifier: - icon: {fileID: 21300000, guid: d199e42b29875f641b7670cd48338056, type: 3} + icon: {fileID: 21300000, guid: 73bf16e0e348ce24394ffea7e72936fd, type: 3} type: 0 aimCanvas: {fileID: 2273039178377770117, guid: 09a0317cbdff9fa479a18c9e20743a8e, type: 3} + _layerMask: + serializedVersion: 2 + m_Bits: 256 + time: 3 diff --git a/Assets/Resources/Data/Level 1/FieldData.asset b/Assets/Resources/Data/Level 1/FieldData.asset index c3a491a0..1356ad23 100644 --- a/Assets/Resources/Data/Level 1/FieldData.asset +++ b/Assets/Resources/Data/Level 1/FieldData.asset @@ -800,8 +800,8 @@ MonoBehaviour: - x: 1 z: 5 levelPath: Assets/Resources/Maps\Level 1 - hexCaptureManaCost: 1 - hexHardCaptureManaCost: 1 + hexCaptureManaCost: 10 + hexHardCaptureManaCost: 20 hexHardCaptureTime: 1 cellPrefab: {fileID: 1661242500252451528, guid: bcea5b4a96735bd4b936f8f3fefcc688, type: 3} cellLabelPrefab: {fileID: 3836123284387241147, guid: efd47cbd22ddfee4aa2b1391914116fc, type: 3} diff --git a/Assets/Resources/Data/Level 1/ItemData.asset b/Assets/Resources/Data/Level 1/ItemData.asset index 20679c62..179fbed2 100644 --- a/Assets/Resources/Data/Level 1/ItemData.asset +++ b/Assets/Resources/Data/Level 1/ItemData.asset @@ -27,6 +27,12 @@ MonoBehaviour: _spawnChance: 0.848 - item: {fileID: 11400000, guid: 464ee9ed5747d0b45828b8d9eaa33dea, type: 2} _spawnChance: 0.698 + - item: {fileID: 11400000, guid: 9aa9a56650b87d54ea46a1c7ab78bf74, type: 2} + _spawnChance: 0.478 + - item: {fileID: 11400000, guid: 99c322c98b2d2eb4a8af928bb6469294, type: 2} + _spawnChance: 0.622 + - item: {fileID: 11400000, guid: e32a04374dd43c34b8d0449d54fa1f19, type: 2} + _spawnChance: 0.476 - item: {fileID: 11400000, guid: 133e523fdd159754e8bf8927faec5b0f, type: 2} _spawnChance: 0.833 - item: {fileID: 11400000, guid: 133e523fdd159754e8bf8927faec5b0f, type: 2} diff --git a/Assets/Resources/Data/Level 1/UnitsData.asset b/Assets/Resources/Data/Level 1/UnitsData.asset index c57eaba0..e86075c6 100644 --- a/Assets/Resources/Data/Level 1/UnitsData.asset +++ b/Assets/Resources/Data/Level 1/UnitsData.asset @@ -20,8 +20,8 @@ MonoBehaviour: z: 4 unitPrefa: {fileID: 7527582019267571087, guid: f102085e8bc4cad4992d43b84dee1055, type: 3} color: 3 - manaRegen: 1000 - maxMana: 1000 + manaRegen: 10 + maxMana: 100 maxHP: 100 inventoryCapacity: 4 - isPlayer: 0 diff --git a/Assets/Scripts/GameUI/PlayerInventoryView.cs b/Assets/Scripts/GameUI/PlayerInventoryView.cs index 85609322..ae85d6ce 100644 --- a/Assets/Scripts/GameUI/PlayerInventoryView.cs +++ b/Assets/Scripts/GameUI/PlayerInventoryView.cs @@ -51,10 +51,17 @@ namespace GameUI private void SwitchButton(Button button) { + if(button == null) + return; button.onClick.RemoveAllListeners(); button.gameObject.SetActive(false); } + private void OnDestroy() + { + OnBuildingInvoked = null; + } + public void PickUpItem(Item Item) { var button = Item.Type switch @@ -86,15 +93,15 @@ namespace GameUI OnBuildingInvoked?.Invoke(_unit, building); break; case CaptureAbility ability: - ability.Invoke((u) => SwitchButton(button)); + ability.Invoke((u) => SwitchButton(button), _unit); OnBuildingInvoked?.Invoke(_unit, ability); break; case SpecialWeapon specialWeapon: - specialWeapon.Invoke((u) => SwitchButton(button)); + specialWeapon.Invoke((u) => SwitchButton(button), _unit); OnBuildingInvoked?.Invoke(_unit,specialWeapon); break; case SwitchingPlaces switchingPlaces: - switchingPlaces.Invoke((u) => SwitchButton(button)); + switchingPlaces.Invoke((u) => SwitchButton(button), _unit); OnBuildingInvoked?.Invoke(_unit, switchingPlaces); break; } diff --git a/Assets/Scripts/HexFiled/HexCell.cs b/Assets/Scripts/HexFiled/HexCell.cs index 86900bc1..1c75d9b5 100644 --- a/Assets/Scripts/HexFiled/HexCell.cs +++ b/Assets/Scripts/HexFiled/HexCell.cs @@ -124,8 +124,7 @@ namespace HexFiled HexManager.UnitCurrentCell .Where(cells - => HexManager.CellByColor[cells.Key].Count < 3 - || (cells.Value.cell == this && cells.Value.unit.Color != Color)) + => HexManager.CellByColor[cells.Key].Count < 3 && !cells.Value.unit.IsStaned) .Select(cells => cells.Value.unit) .ToList().ForEach(x => x.Death()); diff --git a/Assets/Scripts/HexFiled/PaintedController.cs b/Assets/Scripts/HexFiled/PaintedController.cs index 3022175f..549eb7ca 100644 --- a/Assets/Scripts/HexFiled/PaintedController.cs +++ b/Assets/Scripts/HexFiled/PaintedController.cs @@ -49,6 +49,7 @@ namespace HexFiled if (neighbour.Color != UnitColor.Grey && HexManager.UnitCurrentCell.TryGetValue(neighbour.Color, out var unit) + && !unit.unit.IsStaned && hexByColorDict.TryGetValue(neighbour.Color, out var cells) && cells.Count >= 2 && cells.Count < 6) { diff --git a/Assets/Scripts/Items/Bonus.cs b/Assets/Scripts/Items/Bonus.cs index 53805784..6c0f568a 100644 --- a/Assets/Scripts/Items/Bonus.cs +++ b/Assets/Scripts/Items/Bonus.cs @@ -10,7 +10,8 @@ namespace Items Attack, Defence, Heal, - Magnet + Magnet, + Mana } [CreateAssetMenu(fileName = "BonusItem", menuName = "Item/Bonus")] diff --git a/Assets/Scripts/Items/Building.cs b/Assets/Scripts/Items/Building.cs index 68ffbf39..8e232427 100644 --- a/Assets/Scripts/Items/Building.cs +++ b/Assets/Scripts/Items/Building.cs @@ -10,13 +10,12 @@ namespace Items public class Building : Item { [SerializeField] private GameObject buildingPrefab; - private Action _action; + [SerializeField] private bool isVisiting = false; + public void Invoke(Action action) { - if(_action != null) return; - _action = action; - OnItemUsed += _action; + OnItemUsed += action; } @@ -26,11 +25,14 @@ namespace Items var obj = Instantiate(buildingPrefab, cell.transform.position + buildingPrefab.transform.position, Quaternion.identity); obj.GetComponent().SetUp(unit); - - cell.Building = buildingPrefab; - cell.BuildingInstance = obj; + if (!isVisiting) + { + cell.Building = buildingPrefab; + cell.BuildingInstance = obj; + } + OnItemUsed.Invoke(unit); - OnItemUsed = _action; + OnItemUsed = null; } } } \ No newline at end of file diff --git a/Assets/Scripts/Items/CaptureAbility.cs b/Assets/Scripts/Items/CaptureAbility.cs index eb7f3347..a433af76 100644 --- a/Assets/Scripts/Items/CaptureAbility.cs +++ b/Assets/Scripts/Items/CaptureAbility.cs @@ -29,21 +29,21 @@ namespace Items - public void Invoke(Action action) + public void Invoke(Action action, Unit unit) { OnItemUsed ??= action; if(_aimInstance == null) - _aimInstance = Object.Instantiate(aimCanvas, Unit.Instance.transform); + _aimInstance = Object.Instantiate(aimCanvas, unit.Instance.transform); _aimInstance.SetActive(false); } - public void Aim(HexDirection direction) + public void Aim(HexDirection direction, Unit unit) { if(_aimInstance == null) - _aimInstance = Object.Instantiate(aimCanvas, Unit.Instance.transform); + _aimInstance = Object.Instantiate(aimCanvas, unit.Instance.transform); _aimInstance.SetActive(true); - _aimInstance.transform.LookAt(HexManager.UnitCurrentCell[Unit.Color].cell + _aimInstance.transform.LookAt(HexManager.UnitCurrentCell[unit.Color].cell .GetNeighbor(direction).transform); _direction = direction; } @@ -55,9 +55,9 @@ namespace Items private void DoPaint(Unit unit) { - Unit.UseItem(this); - var cell = HexManager.UnitCurrentCell[Unit.Color].cell.GetNeighbor(_direction); - cell.PaintHex(Unit.Color); + unit.UseItem(this); + var cell = HexManager.UnitCurrentCell[unit.Color].cell.GetNeighbor(_direction); + cell.PaintHex(unit.Color); bool keepGoing = true; var moveDir = _direction; itterationMove.ForEach(dir => @@ -80,13 +80,13 @@ namespace Items } cell = cell.GetNeighbor(_direction); - cell.PaintHex(Unit.Color); + cell.PaintHex(unit.Color); }); OnItemUsed?.Invoke(unit); - Unit.UnitView.AnimActionDic[animName] -= DoPaint; + unit.UnitView.AnimActionDic[animName] -= DoPaint; OnItemUsed = null; } @@ -98,7 +98,7 @@ namespace Items (cell.transform.position - unit.Instance.transform.position).normalized.z)); unit.Animator.SetTrigger(animName); _aimInstance.SetActive(false); - unit.SetCell(_direction); + unit.SetCell(cell); unit.UnitView.AnimActionDic[animName] += DoPaint; } } diff --git a/Assets/Scripts/Items/Item.cs b/Assets/Scripts/Items/Item.cs index 2ec15e06..c19523de 100644 --- a/Assets/Scripts/Items/Item.cs +++ b/Assets/Scripts/Items/Item.cs @@ -1,6 +1,7 @@ using System; using System.Runtime.CompilerServices; using DefaultNamespace; +using DG.Tweening; using HexFiled; using Items.ItemViews; using Units; @@ -55,9 +56,12 @@ namespace Items public virtual void PickUp(Unit unit) { - - unit.PickUpItem(this); - Despawn(); + _instance.transform.DOMove(unit.UnitView.transform.position, 0.1f).OnComplete(() => + { + unit.PickUpItem(this); + Despawn(); + }); + } public void Despawn() diff --git a/Assets/Scripts/Items/ItemViews/ItemView.cs b/Assets/Scripts/Items/ItemViews/ItemView.cs index 8a1a3eda..7b6e48b4 100644 --- a/Assets/Scripts/Items/ItemViews/ItemView.cs +++ b/Assets/Scripts/Items/ItemViews/ItemView.cs @@ -28,14 +28,7 @@ namespace Items.ItemViews { transform.DORotate(transform.rotation.eulerAngles + new Vector3(0, 10, 0), 0.1f) .SetEase(Ease.InQuad) - .SetLoops(-1, LoopType.Incremental) - .OnUpdate(() => - { - if (pickedUp) - { - Destroy(gameObject); - } - }); + .SetLoops(-1, LoopType.Incremental); } } } \ No newline at end of file diff --git a/Assets/Scripts/Items/ItemViews/StakeView.cs b/Assets/Scripts/Items/ItemViews/StakeView.cs new file mode 100644 index 00000000..d2e91dc7 --- /dev/null +++ b/Assets/Scripts/Items/ItemViews/StakeView.cs @@ -0,0 +1,55 @@ +using System.Threading.Tasks; +using DefaultNamespace; +using Units; +using UnityEngine; +using Weapons; + +namespace Items.ItemViews +{ + public class StakeView : MonoBehaviour, ISetUp + { + [SerializeField] private int instanceDamage; + [SerializeField] private int timingDamage; + [SerializeField] private int time; + [SerializeField] private GameObject catchVfx; + [SerializeField] private GameObject destroed; + private Unit _unit; + + public void SetUp(Unit unit) + { + _unit = unit; + } + + private void OnCollisionEnter(Collision collisionInfo) + { + var unit = collisionInfo.gameObject.GetComponent(); + var weapon = collisionInfo.gameObject.GetComponent(); + if (unit != null && unit.Color != _unit.Color) + { + unit.OnHit.Invoke(instanceDamage); + StartDamage(unit); + VFXController.Instance.PlayEffect(catchVfx, transform); + } + + if (weapon != null && weapon.Unit.Color != _unit.Color) + { + VFXController.Instance.PlayEffect(destroed, transform.position); + Destroy(gameObject); + } + } + + private async void StartDamage(UnitView unit) + { + for (int i = 0; i < time; i++) + { + await DoTimingDamage(unit); + } + } + + private async Task DoTimingDamage(UnitView unit) + { + await Task.Delay(1000); + unit.OnHit.Invoke(timingDamage); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Items/ItemViews/StakeView.cs.meta b/Assets/Scripts/Items/ItemViews/StakeView.cs.meta new file mode 100644 index 00000000..5b20e794 --- /dev/null +++ b/Assets/Scripts/Items/ItemViews/StakeView.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e951bed62e4063d40a1d67d75554b062 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Items/ItemViews/TowerView.cs b/Assets/Scripts/Items/ItemViews/TowerView.cs index 718fdaf3..a0522995 100644 --- a/Assets/Scripts/Items/ItemViews/TowerView.cs +++ b/Assets/Scripts/Items/ItemViews/TowerView.cs @@ -59,7 +59,7 @@ public class TowerView : MonoBehaviour, ISetUp private IEnumerator Shot() { var direction = DirectionHelper.DirectionTo(transform.position, _target.transform.position); - weapon.Fire(transform, new Vector2(direction.x, direction.z)); + weapon.Fire(transform, new Vector2(direction.x, direction.z), HexManager.UnitCurrentCell[_color].unit); while (_target != null) { yield return new WaitForSecondsRealtime(weapon.reloadTime); @@ -69,7 +69,7 @@ public class TowerView : MonoBehaviour, ISetUp } direction = DirectionHelper.DirectionTo(transform.position, _target.transform.position); - weapon.Fire(transform, new Vector2(direction.x, direction.z)); + weapon.Fire(transform, new Vector2(direction.x, direction.z), HexManager.UnitCurrentCell[_color].unit); } } diff --git a/Assets/Scripts/Items/SpecialWeapon.cs b/Assets/Scripts/Items/SpecialWeapon.cs index 6a8f1269..5e0dd0a0 100644 --- a/Assets/Scripts/Items/SpecialWeapon.cs +++ b/Assets/Scripts/Items/SpecialWeapon.cs @@ -19,19 +19,19 @@ namespace Items private GameObject _aimInstance; private HexDirection _direction; - public void Invoke(Action action) + public void Invoke(Action action, Unit unit) { OnItemUsed ??= action; if(_aimInstance == null || !_aimInstance.activeSelf) - _aimInstance = Object.Instantiate(_aimGameObject, Unit.Instance.transform); + _aimInstance = Object.Instantiate(_aimGameObject, unit.Instance.transform); _aimInstance.SetActive(false); } - public void Aim(HexDirection direction) + public void Aim(HexDirection direction, Unit unit) { _aimInstance.SetActive(true); - _aimInstance.transform.LookAt(HexManager.UnitCurrentCell[Unit.Color].cell + _aimInstance.transform.LookAt(HexManager.UnitCurrentCell[unit.Color].cell .GetNeighbor(direction).transform); _direction = direction; } @@ -52,7 +52,7 @@ namespace Items _weapon.objectToThrow.GetComponent().SetUp(unit); _aimInstance.SetActive(false); var dir = DirectionHelper.DirectionTo(unit.Instance.transform.position, cell.transform.position); - _weapon.Fire(unit.Instance.transform, new Vector2(dir.x, dir.z)); + _weapon.Fire(unit.Instance.transform, new Vector2(dir.x, dir.z), unit); TimerHelper.Instance.StartTimer(() => { _weapon.DestroyBall(); diff --git a/Assets/Scripts/Items/SwitchingPlaces.cs b/Assets/Scripts/Items/SwitchingPlaces.cs index f7359772..a75775dd 100644 --- a/Assets/Scripts/Items/SwitchingPlaces.cs +++ b/Assets/Scripts/Items/SwitchingPlaces.cs @@ -1,4 +1,5 @@ using System; +using DefaultNamespace; using HexFiled; using Units; using UnityEngine; @@ -11,43 +12,77 @@ namespace Items { [SerializeField] private GameObject aimCanvas; [SerializeField] private LayerMask _layerMask; + [SerializeField] private float time; private GameObject _aimInstance; private HexDirection _direction; - private Unit chosenUnit; - public void Invoke(Action action) + + public void Invoke(Action action, Unit unit) { + if (!unit.IsPlayer) + { + return; + } + OnItemUsed ??= action; if (_aimInstance == null) - _aimInstance = Object.Instantiate(aimCanvas, Unit.Instance.transform); + _aimInstance = Object.Instantiate(aimCanvas, unit.Instance.transform); _aimInstance.SetActive(false); } - public void Aim(Vector2 direction) + public void Aim(Vector2 direction, Unit unit, out Unit chosenUnit) { - if (_aimInstance == null) - _aimInstance = Object.Instantiate(aimCanvas, Unit.Instance.transform); - _aimInstance.SetActive(true); - _aimInstance.transform.LookAt( - new Vector3(direction.x, 0, direction.y) + Unit.Instance.transform.position); + if (unit.IsPlayer) + { + if (_aimInstance == null) + _aimInstance = Object.Instantiate(aimCanvas, unit.Instance.transform); + _aimInstance.SetActive(true); + _aimInstance.transform.LookAt( + new Vector3(direction.x, 0, direction.y) + unit.Instance.transform.position); + } - RaycastHit hit; - Ray ray = new Ray(Unit.Instance.transform.position + new Vector3(0, 1f, 0), + Ray ray = new Ray(unit.Instance.transform.position + new Vector3(0, 1f, 0), new Vector3(direction.x, 0, direction.y)); - + if (Physics.Raycast(ray, out hit, Mathf.Infinity, _layerMask)) { Debug.Log($"Aimed {hit.collider.gameObject.name}"); chosenUnit = hit.collider.gameObject.GetComponent().Unit; } - + else + { + chosenUnit = null; + } + Debug.DrawRay(ray.origin, ray.direction * hit.distance, UnityEngine.Color.red); } + + public void UseAbility(Unit unit, Unit chosenUnit) + { + unit.UseItem(this); + DeAim(); + OnItemUsed?.Invoke(unit); + chosenUnit.IsBusy = true; + chosenUnit.IsStaned = true; + var unitCell = HexManager.UnitCurrentCell[unit.Color].cell; + var choseUnitCell = HexManager.UnitCurrentCell[chosenUnit.Color].cell; + unit.SetCell(choseUnitCell, true, true); + unit.SetEasyColor(chosenUnit.Color, time); + chosenUnit.SetCell(unitCell, true); + TimerHelper.Instance.StartTimer(() => + { + chosenUnit.SetCell(choseUnitCell, true, true); + unit.SetCell(unitCell, true); + chosenUnit.IsStaned = false; + chosenUnit.IsBusy = false; + }, time); + } + public void DeAim() { _aimInstance.SetActive(false); diff --git a/Assets/Scripts/Units/PlayerControl.cs b/Assets/Scripts/Units/PlayerControl.cs index df0678af..4304bdec 100644 --- a/Assets/Scripts/Units/PlayerControl.cs +++ b/Assets/Scripts/Units/PlayerControl.cs @@ -30,6 +30,7 @@ namespace Chars private Item _itemToPlace; private HexCell _cellToPlace; + private Unit chosenUnit; private int _aimCount = 0; public PlayerControl(Unit unit, PlayerControlView joyView, PlayerInventoryView inventoryView) @@ -88,6 +89,9 @@ namespace Chars case SpecialWeapon weapon: weapon.Fire(_unit); break; + case SwitchingPlaces switchingPlaces: + switchingPlaces.UseAbility(_unit, chosenUnit); + break; } } @@ -154,14 +158,18 @@ namespace Chars ability.DeAim(); return; } - ability.Aim(DirectionHelper.VectorToDirection(placeDir.normalized)); + ability.Aim(DirectionHelper.VectorToDirection(placeDir.normalized), _unit); _aimCount = 1; break; case SpecialWeapon weapon: - weapon.Aim(DirectionHelper.VectorToDirection(placeDir.normalized)); + weapon.Aim(DirectionHelper.VectorToDirection(placeDir.normalized), _unit); break; case SwitchingPlaces switchingPlaces: - switchingPlaces.Aim(placeDir.normalized); + switchingPlaces.Aim(placeDir.normalized, _unit, out var unit); + if (unit != null) + { + chosenUnit = unit; + } break; } } @@ -190,6 +198,10 @@ namespace Chars case SpecialWeapon weapon: weapon.DeAim(); break; + case SwitchingPlaces place: + place.DeAim(); + break; + } } diff --git a/Assets/Scripts/Units/Unit.cs b/Assets/Scripts/Units/Unit.cs index 3513bb02..5da1e22f 100644 --- a/Assets/Scripts/Units/Unit.cs +++ b/Assets/Scripts/Units/Unit.cs @@ -17,7 +17,6 @@ namespace Units { public class Unit { - private bool _isAlive; private GameObject _instance; private List _inventory; private List _inventoryDefence; @@ -26,39 +25,39 @@ namespace Units private HexGrid _hexGrid; public event Action OnPlayerSpawned; private Animator _animator; - private UnitView _unitView; - private bool _isBusy; private UnitInfo _data; private int _hp; private int _mana; private Weapon _weapon; private Vector2 _direction; - private bool _isHardToCapture; private bool _isCapturing; + private bool _isInfiniteMana; + private int _defenceBonus; private Camera _camera; - + private UnitColor _easyCaptureColor; + + public bool IsStaned; public int AttackBonus => _weapon.modifiedDamage - _weapon.damage; + public int DefenceBonus => _defenceBonus; - public bool IsBusy - { - get => _isBusy; - set => _isBusy = value; - } + public bool IsBusy { get; set; } - public UnitView UnitView => _unitView; - public bool IsAlive => _isAlive; + public UnitView UnitView { get; private set; } + + public bool IsAlive { get; private set; } + + public bool IsHardToCapture { get; private set; } - public bool IsHardToCapture => _isHardToCapture; public UnitColor Color => _data.color; public int InventoryCapacity => _data.inventoryCapacity; public event Action OnItemPickUp; public event Action OnDeath; - public BarCanvas BarCanvas => _unitView.BarCanvas; + public BarCanvas BarCanvas => UnitView.BarCanvas; public GameObject Instance => _instance; public UnitInfo Data => _data; public int Mana => _mana; @@ -66,7 +65,7 @@ namespace Units public List Inventory => _inventory; public List InventoryDefence => _inventoryDefence; public Weapon Weapon => _weapon; - + public bool IsPlayer => _data.isPlayer; public Animator Animator => _animator; @@ -75,11 +74,12 @@ namespace Units _camera = Camera.main; _weapon = weapon; _data = unitData; - _isAlive = false; + IsAlive = false; _hexGrid = hexGrid; - _isBusy = false; - _isHardToCapture = false; + IsBusy = false; + IsHardToCapture = false; _isCapturing = false; + _easyCaptureColor = UnitColor.Grey; } public void SetUpBonus(float duration, int value, BonusType type) @@ -97,7 +97,14 @@ namespace Units case BonusType.Heal: break; case BonusType.Magnet: - + var col = UnitView.gameObject.GetComponent(); + var defRadius = col.radius; + col.radius = value * HexGrid.HexDistance; + TimerHelper.Instance.StartTimer(() => col.radius = defRadius, duration); + break; + case BonusType.Mana: + _isInfiniteMana = true; + TimerHelper.Instance.StartTimer(() => _isInfiniteMana = false, duration); break; default: break; @@ -112,28 +119,30 @@ namespace Units { return; } - _isBusy = false; - _isHardToCapture = false; - _unitView.StopHardCapture(); + + IsBusy = false; + IsHardToCapture = false; + UnitView.StopHardCapture(); Move(dir); } public void Move(HexDirection direction) { - if ( _cell.GetNeighbor(direction) == null || _cell.GetNeighbor(direction).BuildingInstance !=null || _isBusy || _isHardToCapture || + if (_cell.GetNeighbor(direction) == null || _cell.GetNeighbor(direction).BuildingInstance != null || + IsBusy || IsHardToCapture || (_cell.GetNeighbor(direction).Color != Color && HexManager.UnitCurrentCell.TryGetValue(_cell.GetNeighbor(direction).Color, out var value) && value.cell.Equals(_cell.GetNeighbor(direction)))) return; - if (_cell.GetNeighbor(direction).Color == _data.color) + if (_cell.GetNeighbor(direction).Color == _data.color || _cell.GetNeighbor(direction).Color == _easyCaptureColor) { DoTransit(direction); } else if (_cell.GetNeighbor(direction).Color != UnitColor.Grey) { if (_mana - _hexGrid.HexHardCaptureCost <= 0) return; - _isHardToCapture = true; + IsHardToCapture = true; DoTransit(direction); } @@ -146,41 +155,69 @@ namespace Units private void DoTransit(HexDirection direction) { - _isBusy = true; + IsBusy = true; _isCapturing = _data.color != _cell.GetNeighbor(direction).Color; _cell = _cell.GetNeighbor(direction); HexManager.UnitCurrentCell[_data.color] = (_cell, this); RotateUnit(new Vector2((_cell.transform.position - _instance.transform.position).normalized.x, (_cell.transform.position - _instance.transform.position).normalized.z)); _animator.SetTrigger("Move"); - _animator.SetBool("isMoving", _isBusy); + _animator.SetBool("isMoving", IsBusy); _instance.transform.DOMove(_cell.transform.position, _animLength.Move); } - public void SetCell(HexDirection direction) + public void SetCell(HexCell cell, bool isInstanceTrans = false, bool isPaintingHex = false) { - _isBusy = true; - _cell = _cell.GetNeighbor(direction); - _instance.transform.DOMove(_cell.transform.position, _animLength.SuperJump) - .OnComplete(() => _isBusy = false); + _cell = cell; + HexManager.UnitCurrentCell[Color] = (cell, this); + if (!isInstanceTrans) + { + IsBusy = true; + _instance.transform.DOMove(_cell.transform.position, _animLength.SuperJump) + .OnComplete(() => IsBusy = false); + } + else + { + _instance.transform.DOMove(_cell.transform.position, 0.5f).SetEase(Ease.Linear); + } + + if (isPaintingHex) + { + cell.PaintHex(Color, true); + } + + + } + + public void SetEasyColor(UnitColor color, float time) + { + _easyCaptureColor = color; + if (time > 0f) + { + TimerHelper.Instance.StartTimer(() => _easyCaptureColor = UnitColor.Grey, time); + } + } private void CaptureHex() { - if (_isHardToCapture) + if (!_isInfiniteMana) { - _mana -= _hexGrid.HexHardCaptureCost; - } - else - { - _mana -= _hexGrid.HexCaptureCost; - } + if (IsHardToCapture) + { + _mana -= _hexGrid.HexHardCaptureCost; + } + else + { + _mana -= _hexGrid.HexCaptureCost; + } - UnitView.RegenMana(); + UnitView.RegenMana(); + } UpdateBarCanvas(); - _isBusy = false; - _isHardToCapture = false; + IsBusy = false; + IsHardToCapture = false; _cell.PaintHex(_data.color); } @@ -211,31 +248,27 @@ namespace Units public void Spawn(HexCoordinates hexCoordinates, HexCell spawnCell = null) { - if (!_isAlive) + if (!IsAlive) { _cell = spawnCell != null ? spawnCell : _hexGrid.GetCellFromCoord(hexCoordinates); - + _cell.PaintHex(_data.color, true); - _cell.GetListNeighbours().ForEach(x => - { - x?.PaintHex(Color, true); - - }); + _cell.GetListNeighbours().ForEach(x => { x?.PaintHex(Color, true); }); _inventory = new List(); _inventoryDefence = new List(); HexManager.UnitCurrentCell.Add(_data.color, (_cell, this)); _instance = Object.Instantiate(_data.unitPrefa, _cell.transform.parent); - + _instance.transform.localPosition = _cell.transform.localPosition; - _isAlive = true; + IsAlive = true; _animator = _instance.GetComponent(); - _unitView = _instance.AddComponent(); + UnitView = _instance.AddComponent(); - - _unitView.SetUp(_weapon, RegenMana, _data.manaRegen, CaptureHex, + + UnitView.SetUp(_weapon, RegenMana, _data.manaRegen, CaptureHex, this, _hexGrid.HardCaptureTime); SetAnimLength(); MusicController.Instance.AddAudioSource(_instance); @@ -244,7 +277,7 @@ namespace Units SetUpActions(); _weapon.SetModifiedDamage(0); - _isBusy = false; + IsBusy = false; OnPlayerSpawned?.Invoke(this); } } @@ -271,15 +304,16 @@ namespace Units { return true; } + break; default: throw new ArgumentOutOfRangeException(); - } + return false; } - public bool PickUpItem(Item item) + public void PickUpItem(Item item) { switch (item.Type) { @@ -289,7 +323,6 @@ namespace Units _inventory.Add(item); OnItemPickUp?.Invoke(item); _cell.Item = null; - return true; } break; @@ -299,16 +332,12 @@ namespace Units _inventoryDefence.Add(item); OnItemPickUp?.Invoke(item); _cell.Item = null; - return true; } break; default: throw new ArgumentOutOfRangeException(); } - - - return false; } public void UseItem(Item item) @@ -323,17 +352,17 @@ namespace Units private void MoveEnd() { - _isBusy = false; - _animator.SetBool("isMoving", _isBusy); + IsBusy = false; + _animator.SetBool("isMoving", IsBusy); if (!_isCapturing) { return; } - if (_isHardToCapture) + if (IsHardToCapture) { - _unitView.HardCaptureHex(_cell); + UnitView.HardCaptureHex(_cell); } else { @@ -343,7 +372,7 @@ namespace Units private void AttackEnd() { - _isBusy = false; + IsBusy = false; UpdateBarCanvas(); } @@ -352,15 +381,15 @@ namespace Units Aim(_direction); - _weapon.Fire(_instance.transform, _direction); + _weapon.Fire(_instance.transform, _direction, this); } private void SetUpActions() { - _unitView.OnStep += MoveEnd; - _unitView.OnAttackEnd += AttackEnd; - _unitView.OnAttack += Attacking; - _unitView.OnHit += Damage; + UnitView.OnStep += MoveEnd; + UnitView.OnAttackEnd += AttackEnd; + UnitView.OnAttack += Attacking; + UnitView.OnHit += Damage; } private void UpdateBarCanvas() @@ -380,12 +409,12 @@ namespace Units public void Death() { - _unitView.OnStep -= MoveEnd; - _unitView.OnAttackEnd -= AttackEnd; - _unitView.OnAttack -= Attacking; - _unitView.OnHit -= Damage; - _isAlive = false; - _isBusy = true; + UnitView.OnStep -= MoveEnd; + UnitView.OnAttackEnd -= AttackEnd; + UnitView.OnAttack -= Attacking; + UnitView.OnHit -= Damage; + IsAlive = false; + IsBusy = true; HexManager.UnitCurrentCell.Remove(Color); var hexToPaint = HexManager.CellByColor[Color]; _animator.SetTrigger("Death"); @@ -394,7 +423,7 @@ namespace Units TimerHelper.Instance.StartTimer(() => { HexManager.PaintHexList(hexToPaint, UnitColor.Grey); - + Object.Destroy(_instance); OnDeath?.Invoke(this); }, _animLength.Death); @@ -407,15 +436,15 @@ namespace Units public void StartAttack() { - if (_isBusy || !_unitView.Shoot()) return; + if (IsBusy || !UnitView.Shoot()) return; - _isBusy = true; + IsBusy = true; if (_direction.Equals(Vector2.zero)) { var enemy = AIManager.GetNearestUnit(_weapon.disnatce, this); if (enemy == null) _direction = - new Vector2(_unitView.transform.forward.x, _unitView.transform.forward.z); + new Vector2(UnitView.transform.forward.x, UnitView.transform.forward.z); else { var dir = DirectionHelper.DirectionTo(_instance.transform.position, @@ -430,7 +459,7 @@ namespace Units public void RotateUnit(Vector2 direction) { - _unitView.transform.DOLookAt(new Vector3(direction.x, 0, direction.y) + _unitView.transform.position, + UnitView.transform.DOLookAt(new Vector3(direction.x, 0, direction.y) + UnitView.transform.position, 0.1f).onUpdate += () => BarCanvas.transform.LookAt( BarCanvas.transform.position + _camera.transform.rotation * Vector3.back, _camera.transform.rotation * Vector3.up); @@ -438,8 +467,8 @@ namespace Units public void Aim(Vector2 direction) { - _unitView.AimCanvas.transform.LookAt( - new Vector3(direction.x, 0, direction.y) + _unitView.transform.position); + UnitView.AimCanvas.transform.LookAt( + new Vector3(direction.x, 0, direction.y) + UnitView.transform.position); _direction = direction; } @@ -447,12 +476,12 @@ namespace Units { if (_cell.GetNeighbor(direction).Color != Color) { - _unitView.AimCanvas.SetActive(false); + UnitView.AimCanvas.SetActive(false); return null; } var cell = _cell.GetNeighbor(direction); - _unitView.AimCanvas.transform.LookAt(cell.transform); + UnitView.AimCanvas.transform.LookAt(cell.transform); return cell; } @@ -473,7 +502,7 @@ namespace Units return; } - + _hp -= dmg; UpdateBarCanvas(); diff --git a/Assets/Scripts/VFXController.cs b/Assets/Scripts/VFXController.cs index 5beaa09d..8cdbfe19 100644 --- a/Assets/Scripts/VFXController.cs +++ b/Assets/Scripts/VFXController.cs @@ -35,6 +35,10 @@ namespace DefaultNamespace public GameObject PlayEffect(GameObject effect, Transform parent) { + if (effect == null) + { + return null; + } var obj = Object.Instantiate(effect, parent); obj.AddComponent(); return obj; diff --git a/Assets/Scripts/Weapons/Weapon.cs b/Assets/Scripts/Weapons/Weapon.cs index 67c949d5..398af519 100644 --- a/Assets/Scripts/Weapons/Weapon.cs +++ b/Assets/Scripts/Weapons/Weapon.cs @@ -2,6 +2,7 @@ using DefaultNamespace; using DG.Tweening; using HexFiled; +using Units; using UnityEngine; using Object = UnityEngine.Object; @@ -29,7 +30,7 @@ namespace Weapons modifiedDamage = damage + bonus; } - public void Fire(Transform start, Vector2 direction) + public void Fire(Transform start, Vector2 direction, Unit unit) { ball = Object.Instantiate(objectToThrow, start.forward + start.transform.position + new Vector3(0, 2), @@ -37,7 +38,7 @@ namespace Weapons MusicController.Instance.AddAudioSource(ball); MusicController.Instance.PlayAudioClip(shotSound, ball); - ball.AddComponent().SetWeapon(this); + ball.AddComponent().SetWeapon(this, unit); Weapon tmpThis = this; GameObject localBall = ball; localBall.transform.DOMove(new Vector3(direction.normalized.x, diff --git a/Assets/Scripts/Weapons/WeaponView.cs b/Assets/Scripts/Weapons/WeaponView.cs index 8315cc70..c9ae6c34 100644 --- a/Assets/Scripts/Weapons/WeaponView.cs +++ b/Assets/Scripts/Weapons/WeaponView.cs @@ -1,3 +1,4 @@ +using Units; using UnityEngine; namespace Weapons @@ -5,13 +6,12 @@ namespace Weapons public class WeaponView : MonoBehaviour { public Weapon Weapon { get; private set; } + public Unit Unit { get; private set; } - public void SetWeapon(Weapon weapon) + public void SetWeapon(Weapon weapon, Unit unit) { Weapon = weapon; + Unit = unit; } - - - } -} +} \ No newline at end of file