added infinite mana, magnet, stakes, fixed inventory after respawn

This commit is contained in:
dddushesss 2022-02-14 04:15:36 +03:00
parent b2dc16746a
commit 9ca0f33ceb
29 changed files with 544 additions and 407 deletions

View File

@ -11,6 +11,7 @@ GameObject:
- component: {fileID: 8496353649581852521} - component: {fileID: 8496353649581852521}
- component: {fileID: 4775723488397002956} - component: {fileID: 4775723488397002956}
- component: {fileID: 7323469254759840774} - component: {fileID: 7323469254759840774}
- component: {fileID: -6185193896607566498}
m_Layer: 0 m_Layer: 0
m_Name: Stake m_Name: Stake
m_TagString: Untagged m_TagString: Untagged
@ -88,6 +89,21 @@ MeshRenderer:
m_SortingLayer: 0 m_SortingLayer: 0
m_SortingOrder: 0 m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 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 --- !u!1001 &5507685542420688607
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -95,83 +111,67 @@ PrefabInstance:
m_Modification: m_Modification:
m_TransformParent: {fileID: 8496353649581852521} m_TransformParent: {fileID: 8496353649581852521}
m_Modifications: m_Modifications:
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 3 value: 3
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalScale.x propertyPath: m_LocalScale.x
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalScale.y propertyPath: m_LocalScale.y
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalScale.z propertyPath: m_LocalScale.z
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 0.63560295 value: 0.63560295
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: 0.43780622 value: 0.43780622
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalRotation.x propertyPath: m_LocalRotation.x
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalRotation.y propertyPath: m_LocalRotation.y
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalRotation.z propertyPath: m_LocalRotation.z
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.x propertyPath: m_LocalEulerAnglesHint.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.y propertyPath: m_LocalEulerAnglesHint.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.z propertyPath: m_LocalEulerAnglesHint.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -7511558181221131132, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -7511558181221131132, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_Materials.Array.data[0] propertyPath: m_Materials.Array.data[0]
value: value:
objectReference: {fileID: 2100000, guid: d9af6ef07cb7bf64cb1b49fb35307f7e, type: 2} objectReference: {fileID: 2100000, guid: d9af6ef07cb7bf64cb1b49fb35307f7e, type: 2}
- target: {fileID: 919132149155446097, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: 919132149155446097, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_Name propertyPath: m_Name
value: Stake value: Stake
objectReference: {fileID: 0} objectReference: {fileID: 0}
@ -179,8 +179,7 @@ PrefabInstance:
m_SourcePrefab: {fileID: 100100000, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
--- !u!4 &5468922099889817908 stripped --- !u!4 &5468922099889817908 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
m_PrefabInstance: {fileID: 5507685542420688607} m_PrefabInstance: {fileID: 5507685542420688607}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1001 &6106979992260874016 --- !u!1001 &6106979992260874016
@ -190,83 +189,67 @@ PrefabInstance:
m_Modification: m_Modification:
m_TransformParent: {fileID: 8496353649581852521} m_TransformParent: {fileID: 8496353649581852521}
m_Modifications: m_Modifications:
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 4 value: 4
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalScale.x propertyPath: m_LocalScale.x
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalScale.y propertyPath: m_LocalScale.y
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalScale.z propertyPath: m_LocalScale.z
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 0.63560295 value: 0.63560295
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: -0.43780622 value: -0.43780622
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalRotation.x propertyPath: m_LocalRotation.x
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalRotation.y propertyPath: m_LocalRotation.y
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalRotation.z propertyPath: m_LocalRotation.z
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.x propertyPath: m_LocalEulerAnglesHint.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.y propertyPath: m_LocalEulerAnglesHint.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.z propertyPath: m_LocalEulerAnglesHint.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -7511558181221131132, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -7511558181221131132, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_Materials.Array.data[0] propertyPath: m_Materials.Array.data[0]
value: value:
objectReference: {fileID: 2100000, guid: d9af6ef07cb7bf64cb1b49fb35307f7e, type: 2} objectReference: {fileID: 2100000, guid: d9af6ef07cb7bf64cb1b49fb35307f7e, type: 2}
- target: {fileID: 919132149155446097, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: 919132149155446097, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_Name propertyPath: m_Name
value: Stake value: Stake
objectReference: {fileID: 0} objectReference: {fileID: 0}
@ -274,8 +257,7 @@ PrefabInstance:
m_SourcePrefab: {fileID: 100100000, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
--- !u!4 &6001856358739994827 stripped --- !u!4 &6001856358739994827 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
m_PrefabInstance: {fileID: 6106979992260874016} m_PrefabInstance: {fileID: 6106979992260874016}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1001 &6725779859084902877 --- !u!1001 &6725779859084902877
@ -285,83 +267,67 @@ PrefabInstance:
m_Modification: m_Modification:
m_TransformParent: {fileID: 8496353649581852521} m_TransformParent: {fileID: 8496353649581852521}
m_Modifications: m_Modifications:
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalScale.x propertyPath: m_LocalScale.x
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalScale.y propertyPath: m_LocalScale.y
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalScale.z propertyPath: m_LocalScale.z
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: -0.75500464 value: -0.75500464
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalRotation.x propertyPath: m_LocalRotation.x
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalRotation.y propertyPath: m_LocalRotation.y
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalRotation.z propertyPath: m_LocalRotation.z
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.x propertyPath: m_LocalEulerAnglesHint.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.y propertyPath: m_LocalEulerAnglesHint.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.z propertyPath: m_LocalEulerAnglesHint.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -7511558181221131132, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -7511558181221131132, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_Materials.Array.data[0] propertyPath: m_Materials.Array.data[0]
value: value:
objectReference: {fileID: 2100000, guid: d9af6ef07cb7bf64cb1b49fb35307f7e, type: 2} objectReference: {fileID: 2100000, guid: d9af6ef07cb7bf64cb1b49fb35307f7e, type: 2}
- target: {fileID: 919132149155446097, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: 919132149155446097, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_Name propertyPath: m_Name
value: Stake value: Stake
objectReference: {fileID: 0} objectReference: {fileID: 0}
@ -369,8 +335,7 @@ PrefabInstance:
m_SourcePrefab: {fileID: 100100000, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
--- !u!4 &6547244679254435382 stripped --- !u!4 &6547244679254435382 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
m_PrefabInstance: {fileID: 6725779859084902877} m_PrefabInstance: {fileID: 6725779859084902877}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1001 &7281844180473446107 --- !u!1001 &7281844180473446107
@ -380,83 +345,67 @@ PrefabInstance:
m_Modification: m_Modification:
m_TransformParent: {fileID: 8496353649581852521} m_TransformParent: {fileID: 8496353649581852521}
m_Modifications: m_Modifications:
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 2 value: 2
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalScale.x propertyPath: m_LocalScale.x
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalScale.y propertyPath: m_LocalScale.y
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalScale.z propertyPath: m_LocalScale.z
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: -0.63560295 value: -0.63560295
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: 0.43780622 value: 0.43780622
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalRotation.x propertyPath: m_LocalRotation.x
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalRotation.y propertyPath: m_LocalRotation.y
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalRotation.z propertyPath: m_LocalRotation.z
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.x propertyPath: m_LocalEulerAnglesHint.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.y propertyPath: m_LocalEulerAnglesHint.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.z propertyPath: m_LocalEulerAnglesHint.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -7511558181221131132, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -7511558181221131132, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_Materials.Array.data[0] propertyPath: m_Materials.Array.data[0]
value: value:
objectReference: {fileID: 2100000, guid: d9af6ef07cb7bf64cb1b49fb35307f7e, type: 2} objectReference: {fileID: 2100000, guid: d9af6ef07cb7bf64cb1b49fb35307f7e, type: 2}
- target: {fileID: 919132149155446097, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: 919132149155446097, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_Name propertyPath: m_Name
value: Stake value: Stake
objectReference: {fileID: 0} objectReference: {fileID: 0}
@ -464,8 +413,7 @@ PrefabInstance:
m_SourcePrefab: {fileID: 100100000, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
--- !u!4 &7099071380945115440 stripped --- !u!4 &7099071380945115440 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
m_PrefabInstance: {fileID: 7281844180473446107} m_PrefabInstance: {fileID: 7281844180473446107}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1001 &8469668352806300657 --- !u!1001 &8469668352806300657
@ -475,83 +423,67 @@ PrefabInstance:
m_Modification: m_Modification:
m_TransformParent: {fileID: 8496353649581852521} m_TransformParent: {fileID: 8496353649581852521}
m_Modifications: m_Modifications:
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 5 value: 5
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalScale.x propertyPath: m_LocalScale.x
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalScale.y propertyPath: m_LocalScale.y
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalScale.z propertyPath: m_LocalScale.z
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: -0.63560295 value: -0.63560295
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: -0.43780622 value: -0.43780622
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalRotation.x propertyPath: m_LocalRotation.x
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalRotation.y propertyPath: m_LocalRotation.y
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalRotation.z propertyPath: m_LocalRotation.z
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.x propertyPath: m_LocalEulerAnglesHint.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.y propertyPath: m_LocalEulerAnglesHint.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.z propertyPath: m_LocalEulerAnglesHint.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -7511558181221131132, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -7511558181221131132, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_Materials.Array.data[0] propertyPath: m_Materials.Array.data[0]
value: value:
objectReference: {fileID: 2100000, guid: d9af6ef07cb7bf64cb1b49fb35307f7e, type: 2} objectReference: {fileID: 2100000, guid: d9af6ef07cb7bf64cb1b49fb35307f7e, type: 2}
- target: {fileID: 919132149155446097, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: 919132149155446097, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_Name propertyPath: m_Name
value: Stake value: Stake
objectReference: {fileID: 0} objectReference: {fileID: 0}
@ -559,8 +491,7 @@ PrefabInstance:
m_SourcePrefab: {fileID: 100100000, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
--- !u!4 &8214837314205928474 stripped --- !u!4 &8214837314205928474 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
m_PrefabInstance: {fileID: 8469668352806300657} m_PrefabInstance: {fileID: 8469668352806300657}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1001 &8478151692175376759 --- !u!1001 &8478151692175376759
@ -570,108 +501,87 @@ PrefabInstance:
m_Modification: m_Modification:
m_TransformParent: {fileID: 8496353649581852521} m_TransformParent: {fileID: 8496353649581852521}
m_Modifications: m_Modifications:
- target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3}
type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 6 value: 6
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3}
type: 3}
propertyPath: m_LocalScale.x propertyPath: m_LocalScale.x
value: 0.73732454 value: 0.73732454
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3}
type: 3}
propertyPath: m_LocalScale.y propertyPath: m_LocalScale.y
value: 0.73732454 value: 0.73732454
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3}
type: 3}
propertyPath: m_LocalScale.z propertyPath: m_LocalScale.z
value: 0.73732454 value: 0.73732454
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3}
type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3}
type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 0.012060776 value: 0.012060776
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3}
type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3}
type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3}
type: 3}
propertyPath: m_LocalRotation.x propertyPath: m_LocalRotation.x
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3}
type: 3}
propertyPath: m_LocalRotation.y propertyPath: m_LocalRotation.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3}
type: 3}
propertyPath: m_LocalRotation.z propertyPath: m_LocalRotation.z
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.x propertyPath: m_LocalEulerAnglesHint.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.y propertyPath: m_LocalEulerAnglesHint.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, - target: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.z propertyPath: m_LocalEulerAnglesHint.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5327400453591714386, guid: 04efd775509c00144993f7b46ecc2812, - target: {fileID: 5327400453591714386, guid: 04efd775509c00144993f7b46ecc2812, type: 3}
type: 3}
propertyPath: m_Name propertyPath: m_Name
value: OpponentAura value: OpponentAura
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5327400453610800772, guid: 04efd775509c00144993f7b46ecc2812, - target: {fileID: 5327400453610800772, guid: 04efd775509c00144993f7b46ecc2812, type: 3}
type: 3}
propertyPath: InitialModule.startColor.maxColor.a propertyPath: InitialModule.startColor.maxColor.a
value: 0.5372549 value: 0.5372549
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5327400453610800772, guid: 04efd775509c00144993f7b46ecc2812, - target: {fileID: 5327400453610800772, guid: 04efd775509c00144993f7b46ecc2812, type: 3}
type: 3}
propertyPath: InitialModule.startColor.maxColor.b propertyPath: InitialModule.startColor.maxColor.b
value: 0.84019756 value: 0.84019756
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5327400453610800772, guid: 04efd775509c00144993f7b46ecc2812, - target: {fileID: 5327400453610800772, guid: 04efd775509c00144993f7b46ecc2812, type: 3}
type: 3}
propertyPath: InitialModule.startColor.maxColor.r propertyPath: InitialModule.startColor.maxColor.r
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5327400453610810510, guid: 04efd775509c00144993f7b46ecc2812, - target: {fileID: 5327400453610810510, guid: 04efd775509c00144993f7b46ecc2812, type: 3}
type: 3}
propertyPath: InitialModule.startColor.maxColor.a propertyPath: InitialModule.startColor.maxColor.a
value: 0.1764706 value: 0.1764706
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5327400453610810510, guid: 04efd775509c00144993f7b46ecc2812, - target: {fileID: 5327400453610810510, guid: 04efd775509c00144993f7b46ecc2812, type: 3}
type: 3}
propertyPath: InitialModule.startColor.maxColor.b propertyPath: InitialModule.startColor.maxColor.b
value: 0.77448034 value: 0.77448034
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5327400453610883902, guid: 04efd775509c00144993f7b46ecc2812, - target: {fileID: 5327400453610883902, guid: 04efd775509c00144993f7b46ecc2812, type: 3}
type: 3}
propertyPath: InitialModule.startColor.maxColor.b propertyPath: InitialModule.startColor.maxColor.b
value: 0.94541836 value: 0.94541836
objectReference: {fileID: 0} objectReference: {fileID: 0}
@ -679,8 +589,7 @@ PrefabInstance:
m_SourcePrefab: {fileID: 100100000, guid: 04efd775509c00144993f7b46ecc2812, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 04efd775509c00144993f7b46ecc2812, type: 3}
--- !u!4 &4343379307954862499 stripped --- !u!4 &4343379307954862499 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, m_CorrespondingSourceObject: {fileID: 5327400453591529684, guid: 04efd775509c00144993f7b46ecc2812, type: 3}
type: 3}
m_PrefabInstance: {fileID: 8478151692175376759} m_PrefabInstance: {fileID: 8478151692175376759}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1001 &8481238872751102925 --- !u!1001 &8481238872751102925
@ -690,83 +599,67 @@ PrefabInstance:
m_Modification: m_Modification:
m_TransformParent: {fileID: 8496353649581852521} m_TransformParent: {fileID: 8496353649581852521}
m_Modifications: m_Modifications:
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalScale.x propertyPath: m_LocalScale.x
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalScale.y propertyPath: m_LocalScale.y
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalScale.z propertyPath: m_LocalScale.z
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: 0.75500464 value: 0.75500464
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalRotation.x propertyPath: m_LocalRotation.x
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalRotation.y propertyPath: m_LocalRotation.y
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalRotation.z propertyPath: m_LocalRotation.z
value: -0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.x propertyPath: m_LocalEulerAnglesHint.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.y propertyPath: m_LocalEulerAnglesHint.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_LocalEulerAnglesHint.z propertyPath: m_LocalEulerAnglesHint.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -7511558181221131132, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: -7511558181221131132, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_Materials.Array.data[0] propertyPath: m_Materials.Array.data[0]
value: value:
objectReference: {fileID: 2100000, guid: d9af6ef07cb7bf64cb1b49fb35307f7e, type: 2} objectReference: {fileID: 2100000, guid: d9af6ef07cb7bf64cb1b49fb35307f7e, type: 2}
- target: {fileID: 919132149155446097, guid: 8a0bd24a2b0945849a222dc690d34235, - target: {fileID: 919132149155446097, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
propertyPath: m_Name propertyPath: m_Name
value: Stake value: Stake
objectReference: {fileID: 0} objectReference: {fileID: 0}
@ -774,7 +667,6 @@ PrefabInstance:
m_SourcePrefab: {fileID: 100100000, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
--- !u!4 &8230839234490874918 stripped --- !u!4 &8230839234490874918 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 8a0bd24a2b0945849a222dc690d34235, type: 3}
type: 3}
m_PrefabInstance: {fileID: 8481238872751102925} m_PrefabInstance: {fileID: 8481238872751102925}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}

View File

@ -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}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 99c322c98b2d2eb4a8af928bb6469294
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -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}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9aa9a56650b87d54ea46a1c7ab78bf74
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -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}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e32a04374dd43c34b8d0449d54fa1f19
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -12,6 +12,10 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: f9d99aa6a656431c98bbf98460ff38a1, type: 3} m_Script: {fileID: 11500000, guid: f9d99aa6a656431c98bbf98460ff38a1, type: 3}
m_Name: SwitchingPlaces m_Name: SwitchingPlaces
m_EditorClassIdentifier: m_EditorClassIdentifier:
icon: {fileID: 21300000, guid: d199e42b29875f641b7670cd48338056, type: 3} icon: {fileID: 21300000, guid: 73bf16e0e348ce24394ffea7e72936fd, type: 3}
type: 0 type: 0
aimCanvas: {fileID: 2273039178377770117, guid: 09a0317cbdff9fa479a18c9e20743a8e, type: 3} aimCanvas: {fileID: 2273039178377770117, guid: 09a0317cbdff9fa479a18c9e20743a8e, type: 3}
_layerMask:
serializedVersion: 2
m_Bits: 256
time: 3

View File

@ -800,8 +800,8 @@ MonoBehaviour:
- x: 1 - x: 1
z: 5 z: 5
levelPath: Assets/Resources/Maps\Level 1 levelPath: Assets/Resources/Maps\Level 1
hexCaptureManaCost: 1 hexCaptureManaCost: 10
hexHardCaptureManaCost: 1 hexHardCaptureManaCost: 20
hexHardCaptureTime: 1 hexHardCaptureTime: 1
cellPrefab: {fileID: 1661242500252451528, guid: bcea5b4a96735bd4b936f8f3fefcc688, type: 3} cellPrefab: {fileID: 1661242500252451528, guid: bcea5b4a96735bd4b936f8f3fefcc688, type: 3}
cellLabelPrefab: {fileID: 3836123284387241147, guid: efd47cbd22ddfee4aa2b1391914116fc, type: 3} cellLabelPrefab: {fileID: 3836123284387241147, guid: efd47cbd22ddfee4aa2b1391914116fc, type: 3}

View File

@ -27,6 +27,12 @@ MonoBehaviour:
_spawnChance: 0.848 _spawnChance: 0.848
- item: {fileID: 11400000, guid: 464ee9ed5747d0b45828b8d9eaa33dea, type: 2} - item: {fileID: 11400000, guid: 464ee9ed5747d0b45828b8d9eaa33dea, type: 2}
_spawnChance: 0.698 _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} - item: {fileID: 11400000, guid: 133e523fdd159754e8bf8927faec5b0f, type: 2}
_spawnChance: 0.833 _spawnChance: 0.833
- item: {fileID: 11400000, guid: 133e523fdd159754e8bf8927faec5b0f, type: 2} - item: {fileID: 11400000, guid: 133e523fdd159754e8bf8927faec5b0f, type: 2}

View File

@ -20,8 +20,8 @@ MonoBehaviour:
z: 4 z: 4
unitPrefa: {fileID: 7527582019267571087, guid: f102085e8bc4cad4992d43b84dee1055, type: 3} unitPrefa: {fileID: 7527582019267571087, guid: f102085e8bc4cad4992d43b84dee1055, type: 3}
color: 3 color: 3
manaRegen: 1000 manaRegen: 10
maxMana: 1000 maxMana: 100
maxHP: 100 maxHP: 100
inventoryCapacity: 4 inventoryCapacity: 4
- isPlayer: 0 - isPlayer: 0

View File

@ -51,10 +51,17 @@ namespace GameUI
private void SwitchButton(Button button) private void SwitchButton(Button button)
{ {
if(button == null)
return;
button.onClick.RemoveAllListeners(); button.onClick.RemoveAllListeners();
button.gameObject.SetActive(false); button.gameObject.SetActive(false);
} }
private void OnDestroy()
{
OnBuildingInvoked = null;
}
public void PickUpItem(Item Item) public void PickUpItem(Item Item)
{ {
var button = Item.Type switch var button = Item.Type switch
@ -86,15 +93,15 @@ namespace GameUI
OnBuildingInvoked?.Invoke(_unit, building); OnBuildingInvoked?.Invoke(_unit, building);
break; break;
case CaptureAbility ability: case CaptureAbility ability:
ability.Invoke((u) => SwitchButton(button)); ability.Invoke((u) => SwitchButton(button), _unit);
OnBuildingInvoked?.Invoke(_unit, ability); OnBuildingInvoked?.Invoke(_unit, ability);
break; break;
case SpecialWeapon specialWeapon: case SpecialWeapon specialWeapon:
specialWeapon.Invoke((u) => SwitchButton(button)); specialWeapon.Invoke((u) => SwitchButton(button), _unit);
OnBuildingInvoked?.Invoke(_unit,specialWeapon); OnBuildingInvoked?.Invoke(_unit,specialWeapon);
break; break;
case SwitchingPlaces switchingPlaces: case SwitchingPlaces switchingPlaces:
switchingPlaces.Invoke((u) => SwitchButton(button)); switchingPlaces.Invoke((u) => SwitchButton(button), _unit);
OnBuildingInvoked?.Invoke(_unit, switchingPlaces); OnBuildingInvoked?.Invoke(_unit, switchingPlaces);
break; break;
} }

View File

@ -124,8 +124,7 @@ namespace HexFiled
HexManager.UnitCurrentCell HexManager.UnitCurrentCell
.Where(cells .Where(cells
=> HexManager.CellByColor[cells.Key].Count < 3 => HexManager.CellByColor[cells.Key].Count < 3 && !cells.Value.unit.IsStaned)
|| (cells.Value.cell == this && cells.Value.unit.Color != Color))
.Select(cells => cells.Value.unit) .Select(cells => cells.Value.unit)
.ToList().ForEach(x => x.Death()); .ToList().ForEach(x => x.Death());

View File

@ -49,6 +49,7 @@ namespace HexFiled
if (neighbour.Color != UnitColor.Grey if (neighbour.Color != UnitColor.Grey
&& HexManager.UnitCurrentCell.TryGetValue(neighbour.Color, out var unit) && HexManager.UnitCurrentCell.TryGetValue(neighbour.Color, out var unit)
&& !unit.unit.IsStaned
&& hexByColorDict.TryGetValue(neighbour.Color, out var cells) && hexByColorDict.TryGetValue(neighbour.Color, out var cells)
&& cells.Count >= 2 && cells.Count < 6) && cells.Count >= 2 && cells.Count < 6)
{ {

View File

@ -10,7 +10,8 @@ namespace Items
Attack, Attack,
Defence, Defence,
Heal, Heal,
Magnet Magnet,
Mana
} }
[CreateAssetMenu(fileName = "BonusItem", menuName = "Item/Bonus")] [CreateAssetMenu(fileName = "BonusItem", menuName = "Item/Bonus")]

View File

@ -10,13 +10,12 @@ namespace Items
public class Building : Item public class Building : Item
{ {
[SerializeField] private GameObject buildingPrefab; [SerializeField] private GameObject buildingPrefab;
private Action<Unit> _action; [SerializeField] private bool isVisiting = false;
public void Invoke(Action<Unit> action) public void Invoke(Action<Unit> action)
{ {
if(_action != null) return; OnItemUsed += action;
_action = action;
OnItemUsed += _action;
} }
@ -26,11 +25,14 @@ namespace Items
var obj = Instantiate(buildingPrefab, var obj = Instantiate(buildingPrefab,
cell.transform.position + buildingPrefab.transform.position, Quaternion.identity); cell.transform.position + buildingPrefab.transform.position, Quaternion.identity);
obj.GetComponent<ISetUp>().SetUp(unit); obj.GetComponent<ISetUp>().SetUp(unit);
if (!isVisiting)
{
cell.Building = buildingPrefab; cell.Building = buildingPrefab;
cell.BuildingInstance = obj; cell.BuildingInstance = obj;
}
OnItemUsed.Invoke(unit); OnItemUsed.Invoke(unit);
OnItemUsed = _action; OnItemUsed = null;
} }
} }
} }

View File

@ -29,21 +29,21 @@ namespace Items
public void Invoke(Action<Unit> action) public void Invoke(Action<Unit> action, Unit unit)
{ {
OnItemUsed ??= action; OnItemUsed ??= action;
if(_aimInstance == null) if(_aimInstance == null)
_aimInstance = Object.Instantiate(aimCanvas, Unit.Instance.transform); _aimInstance = Object.Instantiate(aimCanvas, unit.Instance.transform);
_aimInstance.SetActive(false); _aimInstance.SetActive(false);
} }
public void Aim(HexDirection direction) public void Aim(HexDirection direction, Unit unit)
{ {
if(_aimInstance == null) if(_aimInstance == null)
_aimInstance = Object.Instantiate(aimCanvas, Unit.Instance.transform); _aimInstance = Object.Instantiate(aimCanvas, unit.Instance.transform);
_aimInstance.SetActive(true); _aimInstance.SetActive(true);
_aimInstance.transform.LookAt(HexManager.UnitCurrentCell[Unit.Color].cell _aimInstance.transform.LookAt(HexManager.UnitCurrentCell[unit.Color].cell
.GetNeighbor(direction).transform); .GetNeighbor(direction).transform);
_direction = direction; _direction = direction;
} }
@ -55,9 +55,9 @@ namespace Items
private void DoPaint(Unit unit) private void DoPaint(Unit unit)
{ {
Unit.UseItem(this); unit.UseItem(this);
var cell = HexManager.UnitCurrentCell[Unit.Color].cell.GetNeighbor(_direction); var cell = HexManager.UnitCurrentCell[unit.Color].cell.GetNeighbor(_direction);
cell.PaintHex(Unit.Color); cell.PaintHex(unit.Color);
bool keepGoing = true; bool keepGoing = true;
var moveDir = _direction; var moveDir = _direction;
itterationMove.ForEach(dir => itterationMove.ForEach(dir =>
@ -80,13 +80,13 @@ namespace Items
} }
cell = cell.GetNeighbor(_direction); cell = cell.GetNeighbor(_direction);
cell.PaintHex(Unit.Color); cell.PaintHex(unit.Color);
}); });
OnItemUsed?.Invoke(unit); OnItemUsed?.Invoke(unit);
Unit.UnitView.AnimActionDic[animName] -= DoPaint; unit.UnitView.AnimActionDic[animName] -= DoPaint;
OnItemUsed = null; OnItemUsed = null;
} }
@ -98,7 +98,7 @@ namespace Items
(cell.transform.position - unit.Instance.transform.position).normalized.z)); (cell.transform.position - unit.Instance.transform.position).normalized.z));
unit.Animator.SetTrigger(animName); unit.Animator.SetTrigger(animName);
_aimInstance.SetActive(false); _aimInstance.SetActive(false);
unit.SetCell(_direction); unit.SetCell(cell);
unit.UnitView.AnimActionDic[animName] += DoPaint; unit.UnitView.AnimActionDic[animName] += DoPaint;
} }
} }

View File

@ -1,6 +1,7 @@
using System; using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using DefaultNamespace; using DefaultNamespace;
using DG.Tweening;
using HexFiled; using HexFiled;
using Items.ItemViews; using Items.ItemViews;
using Units; using Units;
@ -55,9 +56,12 @@ namespace Items
public virtual void PickUp(Unit unit) public virtual void PickUp(Unit unit)
{ {
_instance.transform.DOMove(unit.UnitView.transform.position, 0.1f).OnComplete(() =>
{
unit.PickUpItem(this); unit.PickUpItem(this);
Despawn(); Despawn();
});
} }
public void Despawn() public void Despawn()

View File

@ -28,14 +28,7 @@ namespace Items.ItemViews
{ {
transform.DORotate(transform.rotation.eulerAngles + new Vector3(0, 10, 0), 0.1f) transform.DORotate(transform.rotation.eulerAngles + new Vector3(0, 10, 0), 0.1f)
.SetEase(Ease.InQuad) .SetEase(Ease.InQuad)
.SetLoops(-1, LoopType.Incremental) .SetLoops(-1, LoopType.Incremental);
.OnUpdate(() =>
{
if (pickedUp)
{
Destroy(gameObject);
}
});
} }
} }
} }

View File

@ -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<UnitView>();
var weapon = collisionInfo.gameObject.GetComponent<WeaponView>();
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);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e951bed62e4063d40a1d67d75554b062
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -59,7 +59,7 @@ public class TowerView : MonoBehaviour, ISetUp
private IEnumerator Shot() private IEnumerator Shot()
{ {
var direction = DirectionHelper.DirectionTo(transform.position, _target.transform.position); 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) while (_target != null)
{ {
yield return new WaitForSecondsRealtime(weapon.reloadTime); yield return new WaitForSecondsRealtime(weapon.reloadTime);
@ -69,7 +69,7 @@ public class TowerView : MonoBehaviour, ISetUp
} }
direction = DirectionHelper.DirectionTo(transform.position, _target.transform.position); 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);
} }
} }

View File

@ -19,19 +19,19 @@ namespace Items
private GameObject _aimInstance; private GameObject _aimInstance;
private HexDirection _direction; private HexDirection _direction;
public void Invoke(Action<Unit> action) public void Invoke(Action<Unit> action, Unit unit)
{ {
OnItemUsed ??= action; OnItemUsed ??= action;
if(_aimInstance == null || !_aimInstance.activeSelf) if(_aimInstance == null || !_aimInstance.activeSelf)
_aimInstance = Object.Instantiate(_aimGameObject, Unit.Instance.transform); _aimInstance = Object.Instantiate(_aimGameObject, unit.Instance.transform);
_aimInstance.SetActive(false); _aimInstance.SetActive(false);
} }
public void Aim(HexDirection direction) public void Aim(HexDirection direction, Unit unit)
{ {
_aimInstance.SetActive(true); _aimInstance.SetActive(true);
_aimInstance.transform.LookAt(HexManager.UnitCurrentCell[Unit.Color].cell _aimInstance.transform.LookAt(HexManager.UnitCurrentCell[unit.Color].cell
.GetNeighbor(direction).transform); .GetNeighbor(direction).transform);
_direction = direction; _direction = direction;
} }
@ -52,7 +52,7 @@ namespace Items
_weapon.objectToThrow.GetComponent<ISetUp>().SetUp(unit); _weapon.objectToThrow.GetComponent<ISetUp>().SetUp(unit);
_aimInstance.SetActive(false); _aimInstance.SetActive(false);
var dir = DirectionHelper.DirectionTo(unit.Instance.transform.position, cell.transform.position); 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(() => TimerHelper.Instance.StartTimer(() =>
{ {
_weapon.DestroyBall(); _weapon.DestroyBall();

View File

@ -1,4 +1,5 @@
using System; using System;
using DefaultNamespace;
using HexFiled; using HexFiled;
using Units; using Units;
using UnityEngine; using UnityEngine;
@ -11,30 +12,38 @@ namespace Items
{ {
[SerializeField] private GameObject aimCanvas; [SerializeField] private GameObject aimCanvas;
[SerializeField] private LayerMask _layerMask; [SerializeField] private LayerMask _layerMask;
[SerializeField] private float time;
private GameObject _aimInstance; private GameObject _aimInstance;
private HexDirection _direction; private HexDirection _direction;
private Unit chosenUnit;
public void Invoke(Action<Unit> action)
public void Invoke(Action<Unit> action, Unit unit)
{ {
if (!unit.IsPlayer)
{
return;
}
OnItemUsed ??= action; OnItemUsed ??= action;
if (_aimInstance == null) if (_aimInstance == null)
_aimInstance = Object.Instantiate(aimCanvas, Unit.Instance.transform); _aimInstance = Object.Instantiate(aimCanvas, unit.Instance.transform);
_aimInstance.SetActive(false); _aimInstance.SetActive(false);
} }
public void Aim(Vector2 direction) public void Aim(Vector2 direction, Unit unit, out Unit chosenUnit)
{
if (unit.IsPlayer)
{ {
if (_aimInstance == null) if (_aimInstance == null)
_aimInstance = Object.Instantiate(aimCanvas, Unit.Instance.transform); _aimInstance = Object.Instantiate(aimCanvas, unit.Instance.transform);
_aimInstance.SetActive(true); _aimInstance.SetActive(true);
_aimInstance.transform.LookAt( _aimInstance.transform.LookAt(
new Vector3(direction.x, 0, direction.y) + Unit.Instance.transform.position); new Vector3(direction.x, 0, direction.y) + unit.Instance.transform.position);
}
RaycastHit hit; 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)); new Vector3(direction.x, 0, direction.y));
if (Physics.Raycast(ray, out hit, Mathf.Infinity, _layerMask)) if (Physics.Raycast(ray, out hit, Mathf.Infinity, _layerMask))
@ -43,11 +52,37 @@ namespace Items
chosenUnit = hit.collider.gameObject.GetComponent<UnitView>().Unit; chosenUnit = hit.collider.gameObject.GetComponent<UnitView>().Unit;
} }
else
{
chosenUnit = null;
}
Debug.DrawRay(ray.origin, Debug.DrawRay(ray.origin,
ray.direction * hit.distance, UnityEngine.Color.red); 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() public void DeAim()
{ {
_aimInstance.SetActive(false); _aimInstance.SetActive(false);

View File

@ -30,6 +30,7 @@ namespace Chars
private Item _itemToPlace; private Item _itemToPlace;
private HexCell _cellToPlace; private HexCell _cellToPlace;
private Unit chosenUnit;
private int _aimCount = 0; private int _aimCount = 0;
public PlayerControl(Unit unit, PlayerControlView joyView, PlayerInventoryView inventoryView) public PlayerControl(Unit unit, PlayerControlView joyView, PlayerInventoryView inventoryView)
@ -88,6 +89,9 @@ namespace Chars
case SpecialWeapon weapon: case SpecialWeapon weapon:
weapon.Fire(_unit); weapon.Fire(_unit);
break; break;
case SwitchingPlaces switchingPlaces:
switchingPlaces.UseAbility(_unit, chosenUnit);
break;
} }
} }
@ -154,14 +158,18 @@ namespace Chars
ability.DeAim(); ability.DeAim();
return; return;
} }
ability.Aim(DirectionHelper.VectorToDirection(placeDir.normalized)); ability.Aim(DirectionHelper.VectorToDirection(placeDir.normalized), _unit);
_aimCount = 1; _aimCount = 1;
break; break;
case SpecialWeapon weapon: case SpecialWeapon weapon:
weapon.Aim(DirectionHelper.VectorToDirection(placeDir.normalized)); weapon.Aim(DirectionHelper.VectorToDirection(placeDir.normalized), _unit);
break; break;
case SwitchingPlaces switchingPlaces: case SwitchingPlaces switchingPlaces:
switchingPlaces.Aim(placeDir.normalized); switchingPlaces.Aim(placeDir.normalized, _unit, out var unit);
if (unit != null)
{
chosenUnit = unit;
}
break; break;
} }
} }
@ -190,6 +198,10 @@ namespace Chars
case SpecialWeapon weapon: case SpecialWeapon weapon:
weapon.DeAim(); weapon.DeAim();
break; break;
case SwitchingPlaces place:
place.DeAim();
break;
} }
} }

View File

@ -17,7 +17,6 @@ namespace Units
{ {
public class Unit public class Unit
{ {
private bool _isAlive;
private GameObject _instance; private GameObject _instance;
private List<Item> _inventory; private List<Item> _inventory;
private List<Item> _inventoryDefence; private List<Item> _inventoryDefence;
@ -26,39 +25,39 @@ namespace Units
private HexGrid _hexGrid; private HexGrid _hexGrid;
public event Action<Unit> OnPlayerSpawned; public event Action<Unit> OnPlayerSpawned;
private Animator _animator; private Animator _animator;
private UnitView _unitView;
private bool _isBusy;
private UnitInfo _data; private UnitInfo _data;
private int _hp; private int _hp;
private int _mana; private int _mana;
private Weapon _weapon; private Weapon _weapon;
private Vector2 _direction; private Vector2 _direction;
private bool _isHardToCapture;
private bool _isCapturing; private bool _isCapturing;
private bool _isInfiniteMana;
private int _defenceBonus; private int _defenceBonus;
private Camera _camera; private Camera _camera;
private UnitColor _easyCaptureColor;
public bool IsStaned;
public int AttackBonus => _weapon.modifiedDamage - _weapon.damage; public int AttackBonus => _weapon.modifiedDamage - _weapon.damage;
public int DefenceBonus => _defenceBonus; public int DefenceBonus => _defenceBonus;
public bool IsBusy public bool IsBusy { get; set; }
{
get => _isBusy;
set => _isBusy = value;
}
public UnitView UnitView => _unitView; public UnitView UnitView { get; private set; }
public bool IsAlive => _isAlive;
public bool IsAlive { get; private set; }
public bool IsHardToCapture { get; private set; }
public bool IsHardToCapture => _isHardToCapture;
public UnitColor Color => _data.color; public UnitColor Color => _data.color;
public int InventoryCapacity => _data.inventoryCapacity; public int InventoryCapacity => _data.inventoryCapacity;
public event Action<Item> OnItemPickUp; public event Action<Item> OnItemPickUp;
public event Action<Unit> OnDeath; public event Action<Unit> OnDeath;
public BarCanvas BarCanvas => _unitView.BarCanvas; public BarCanvas BarCanvas => UnitView.BarCanvas;
public GameObject Instance => _instance; public GameObject Instance => _instance;
public UnitInfo Data => _data; public UnitInfo Data => _data;
public int Mana => _mana; public int Mana => _mana;
@ -66,7 +65,7 @@ namespace Units
public List<Item> Inventory => _inventory; public List<Item> Inventory => _inventory;
public List<Item> InventoryDefence => _inventoryDefence; public List<Item> InventoryDefence => _inventoryDefence;
public Weapon Weapon => _weapon; public Weapon Weapon => _weapon;
public bool IsPlayer => _data.isPlayer;
public Animator Animator => _animator; public Animator Animator => _animator;
@ -75,11 +74,12 @@ namespace Units
_camera = Camera.main; _camera = Camera.main;
_weapon = weapon; _weapon = weapon;
_data = unitData; _data = unitData;
_isAlive = false; IsAlive = false;
_hexGrid = hexGrid; _hexGrid = hexGrid;
_isBusy = false; IsBusy = false;
_isHardToCapture = false; IsHardToCapture = false;
_isCapturing = false; _isCapturing = false;
_easyCaptureColor = UnitColor.Grey;
} }
public void SetUpBonus(float duration, int value, BonusType type) public void SetUpBonus(float duration, int value, BonusType type)
@ -97,7 +97,14 @@ namespace Units
case BonusType.Heal: case BonusType.Heal:
break; break;
case BonusType.Magnet: case BonusType.Magnet:
var col = UnitView.gameObject.GetComponent<CapsuleCollider>();
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; break;
default: default:
break; break;
@ -112,28 +119,30 @@ namespace Units
{ {
return; return;
} }
_isBusy = false;
_isHardToCapture = false; IsBusy = false;
_unitView.StopHardCapture(); IsHardToCapture = false;
UnitView.StopHardCapture();
Move(dir); Move(dir);
} }
public void Move(HexDirection direction) 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 (_cell.GetNeighbor(direction).Color != Color
&& HexManager.UnitCurrentCell.TryGetValue(_cell.GetNeighbor(direction).Color, out var value) && HexManager.UnitCurrentCell.TryGetValue(_cell.GetNeighbor(direction).Color, out var value)
&& value.cell.Equals(_cell.GetNeighbor(direction)))) return; && 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); DoTransit(direction);
} }
else if (_cell.GetNeighbor(direction).Color != UnitColor.Grey) else if (_cell.GetNeighbor(direction).Color != UnitColor.Grey)
{ {
if (_mana - _hexGrid.HexHardCaptureCost <= 0) return; if (_mana - _hexGrid.HexHardCaptureCost <= 0) return;
_isHardToCapture = true; IsHardToCapture = true;
DoTransit(direction); DoTransit(direction);
} }
@ -146,28 +155,55 @@ namespace Units
private void DoTransit(HexDirection direction) private void DoTransit(HexDirection direction)
{ {
_isBusy = true; IsBusy = true;
_isCapturing = _data.color != _cell.GetNeighbor(direction).Color; _isCapturing = _data.color != _cell.GetNeighbor(direction).Color;
_cell = _cell.GetNeighbor(direction); _cell = _cell.GetNeighbor(direction);
HexManager.UnitCurrentCell[_data.color] = (_cell, this); HexManager.UnitCurrentCell[_data.color] = (_cell, this);
RotateUnit(new Vector2((_cell.transform.position - _instance.transform.position).normalized.x, RotateUnit(new Vector2((_cell.transform.position - _instance.transform.position).normalized.x,
(_cell.transform.position - _instance.transform.position).normalized.z)); (_cell.transform.position - _instance.transform.position).normalized.z));
_animator.SetTrigger("Move"); _animator.SetTrigger("Move");
_animator.SetBool("isMoving", _isBusy); _animator.SetBool("isMoving", IsBusy);
_instance.transform.DOMove(_cell.transform.position, _animLength.Move); _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;
_cell = _cell.GetNeighbor(direction); HexManager.UnitCurrentCell[Color] = (cell, this);
if (!isInstanceTrans)
{
IsBusy = true;
_instance.transform.DOMove(_cell.transform.position, _animLength.SuperJump) _instance.transform.DOMove(_cell.transform.position, _animLength.SuperJump)
.OnComplete(() => _isBusy = false); .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() private void CaptureHex()
{ {
if (_isHardToCapture) if (!_isInfiniteMana)
{
if (IsHardToCapture)
{ {
_mana -= _hexGrid.HexHardCaptureCost; _mana -= _hexGrid.HexHardCaptureCost;
} }
@ -177,10 +213,11 @@ namespace Units
} }
UnitView.RegenMana(); UnitView.RegenMana();
}
UpdateBarCanvas(); UpdateBarCanvas();
_isBusy = false; IsBusy = false;
_isHardToCapture = false; IsHardToCapture = false;
_cell.PaintHex(_data.color); _cell.PaintHex(_data.color);
} }
@ -211,16 +248,12 @@ namespace Units
public void Spawn(HexCoordinates hexCoordinates, HexCell spawnCell = null) public void Spawn(HexCoordinates hexCoordinates, HexCell spawnCell = null)
{ {
if (!_isAlive) if (!IsAlive)
{ {
_cell = spawnCell != null ? spawnCell : _hexGrid.GetCellFromCoord(hexCoordinates); _cell = spawnCell != null ? spawnCell : _hexGrid.GetCellFromCoord(hexCoordinates);
_cell.PaintHex(_data.color, true); _cell.PaintHex(_data.color, true);
_cell.GetListNeighbours().ForEach(x => _cell.GetListNeighbours().ForEach(x => { x?.PaintHex(Color, true); });
{
x?.PaintHex(Color, true);
});
_inventory = new List<Item>(); _inventory = new List<Item>();
_inventoryDefence = new List<Item>(); _inventoryDefence = new List<Item>();
@ -230,12 +263,12 @@ namespace Units
_instance.transform.localPosition = _cell.transform.localPosition; _instance.transform.localPosition = _cell.transform.localPosition;
_isAlive = true; IsAlive = true;
_animator = _instance.GetComponent<Animator>(); _animator = _instance.GetComponent<Animator>();
_unitView = _instance.AddComponent<UnitView>(); UnitView = _instance.AddComponent<UnitView>();
_unitView.SetUp(_weapon, RegenMana, _data.manaRegen, CaptureHex, UnitView.SetUp(_weapon, RegenMana, _data.manaRegen, CaptureHex,
this, _hexGrid.HardCaptureTime); this, _hexGrid.HardCaptureTime);
SetAnimLength(); SetAnimLength();
MusicController.Instance.AddAudioSource(_instance); MusicController.Instance.AddAudioSource(_instance);
@ -244,7 +277,7 @@ namespace Units
SetUpActions(); SetUpActions();
_weapon.SetModifiedDamage(0); _weapon.SetModifiedDamage(0);
_isBusy = false; IsBusy = false;
OnPlayerSpawned?.Invoke(this); OnPlayerSpawned?.Invoke(this);
} }
} }
@ -271,15 +304,16 @@ namespace Units
{ {
return true; return true;
} }
break; break;
default: default:
throw new ArgumentOutOfRangeException(); throw new ArgumentOutOfRangeException();
} }
return false; return false;
} }
public bool PickUpItem(Item item) public void PickUpItem(Item item)
{ {
switch (item.Type) switch (item.Type)
{ {
@ -289,7 +323,6 @@ namespace Units
_inventory.Add(item); _inventory.Add(item);
OnItemPickUp?.Invoke(item); OnItemPickUp?.Invoke(item);
_cell.Item = null; _cell.Item = null;
return true;
} }
break; break;
@ -299,16 +332,12 @@ namespace Units
_inventoryDefence.Add(item); _inventoryDefence.Add(item);
OnItemPickUp?.Invoke(item); OnItemPickUp?.Invoke(item);
_cell.Item = null; _cell.Item = null;
return true;
} }
break; break;
default: default:
throw new ArgumentOutOfRangeException(); throw new ArgumentOutOfRangeException();
} }
return false;
} }
public void UseItem(Item item) public void UseItem(Item item)
@ -323,17 +352,17 @@ namespace Units
private void MoveEnd() private void MoveEnd()
{ {
_isBusy = false; IsBusy = false;
_animator.SetBool("isMoving", _isBusy); _animator.SetBool("isMoving", IsBusy);
if (!_isCapturing) if (!_isCapturing)
{ {
return; return;
} }
if (_isHardToCapture) if (IsHardToCapture)
{ {
_unitView.HardCaptureHex(_cell); UnitView.HardCaptureHex(_cell);
} }
else else
{ {
@ -343,7 +372,7 @@ namespace Units
private void AttackEnd() private void AttackEnd()
{ {
_isBusy = false; IsBusy = false;
UpdateBarCanvas(); UpdateBarCanvas();
} }
@ -352,15 +381,15 @@ namespace Units
Aim(_direction); Aim(_direction);
_weapon.Fire(_instance.transform, _direction); _weapon.Fire(_instance.transform, _direction, this);
} }
private void SetUpActions() private void SetUpActions()
{ {
_unitView.OnStep += MoveEnd; UnitView.OnStep += MoveEnd;
_unitView.OnAttackEnd += AttackEnd; UnitView.OnAttackEnd += AttackEnd;
_unitView.OnAttack += Attacking; UnitView.OnAttack += Attacking;
_unitView.OnHit += Damage; UnitView.OnHit += Damage;
} }
private void UpdateBarCanvas() private void UpdateBarCanvas()
@ -380,12 +409,12 @@ namespace Units
public void Death() public void Death()
{ {
_unitView.OnStep -= MoveEnd; UnitView.OnStep -= MoveEnd;
_unitView.OnAttackEnd -= AttackEnd; UnitView.OnAttackEnd -= AttackEnd;
_unitView.OnAttack -= Attacking; UnitView.OnAttack -= Attacking;
_unitView.OnHit -= Damage; UnitView.OnHit -= Damage;
_isAlive = false; IsAlive = false;
_isBusy = true; IsBusy = true;
HexManager.UnitCurrentCell.Remove(Color); HexManager.UnitCurrentCell.Remove(Color);
var hexToPaint = HexManager.CellByColor[Color]; var hexToPaint = HexManager.CellByColor[Color];
_animator.SetTrigger("Death"); _animator.SetTrigger("Death");
@ -407,15 +436,15 @@ namespace Units
public void StartAttack() public void StartAttack()
{ {
if (_isBusy || !_unitView.Shoot()) return; if (IsBusy || !UnitView.Shoot()) return;
_isBusy = true; IsBusy = true;
if (_direction.Equals(Vector2.zero)) if (_direction.Equals(Vector2.zero))
{ {
var enemy = AIManager.GetNearestUnit(_weapon.disnatce, this); var enemy = AIManager.GetNearestUnit(_weapon.disnatce, this);
if (enemy == null) if (enemy == null)
_direction = _direction =
new Vector2(_unitView.transform.forward.x, _unitView.transform.forward.z); new Vector2(UnitView.transform.forward.x, UnitView.transform.forward.z);
else else
{ {
var dir = DirectionHelper.DirectionTo(_instance.transform.position, var dir = DirectionHelper.DirectionTo(_instance.transform.position,
@ -430,7 +459,7 @@ namespace Units
public void RotateUnit(Vector2 direction) 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( 0.1f).onUpdate += () => BarCanvas.transform.LookAt(
BarCanvas.transform.position + _camera.transform.rotation * Vector3.back, BarCanvas.transform.position + _camera.transform.rotation * Vector3.back,
_camera.transform.rotation * Vector3.up); _camera.transform.rotation * Vector3.up);
@ -438,8 +467,8 @@ namespace Units
public void Aim(Vector2 direction) public void Aim(Vector2 direction)
{ {
_unitView.AimCanvas.transform.LookAt( UnitView.AimCanvas.transform.LookAt(
new Vector3(direction.x, 0, direction.y) + _unitView.transform.position); new Vector3(direction.x, 0, direction.y) + UnitView.transform.position);
_direction = direction; _direction = direction;
} }
@ -447,12 +476,12 @@ namespace Units
{ {
if (_cell.GetNeighbor(direction).Color != Color) if (_cell.GetNeighbor(direction).Color != Color)
{ {
_unitView.AimCanvas.SetActive(false); UnitView.AimCanvas.SetActive(false);
return null; return null;
} }
var cell = _cell.GetNeighbor(direction); var cell = _cell.GetNeighbor(direction);
_unitView.AimCanvas.transform.LookAt(cell.transform); UnitView.AimCanvas.transform.LookAt(cell.transform);
return cell; return cell;
} }

View File

@ -35,6 +35,10 @@ namespace DefaultNamespace
public GameObject PlayEffect(GameObject effect, Transform parent) public GameObject PlayEffect(GameObject effect, Transform parent)
{ {
if (effect == null)
{
return null;
}
var obj = Object.Instantiate(effect, parent); var obj = Object.Instantiate(effect, parent);
obj.AddComponent<VFXView>(); obj.AddComponent<VFXView>();
return obj; return obj;

View File

@ -2,6 +2,7 @@
using DefaultNamespace; using DefaultNamespace;
using DG.Tweening; using DG.Tweening;
using HexFiled; using HexFiled;
using Units;
using UnityEngine; using UnityEngine;
using Object = UnityEngine.Object; using Object = UnityEngine.Object;
@ -29,7 +30,7 @@ namespace Weapons
modifiedDamage = damage + bonus; modifiedDamage = damage + bonus;
} }
public void Fire(Transform start, Vector2 direction) public void Fire(Transform start, Vector2 direction, Unit unit)
{ {
ball = Object.Instantiate(objectToThrow, ball = Object.Instantiate(objectToThrow,
start.forward + start.transform.position + new Vector3(0, 2), start.forward + start.transform.position + new Vector3(0, 2),
@ -37,7 +38,7 @@ namespace Weapons
MusicController.Instance.AddAudioSource(ball); MusicController.Instance.AddAudioSource(ball);
MusicController.Instance.PlayAudioClip(shotSound, ball); MusicController.Instance.PlayAudioClip(shotSound, ball);
ball.AddComponent<WeaponView>().SetWeapon(this); ball.AddComponent<WeaponView>().SetWeapon(this, unit);
Weapon tmpThis = this; Weapon tmpThis = this;
GameObject localBall = ball; GameObject localBall = ball;
localBall.transform.DOMove(new Vector3(direction.normalized.x, localBall.transform.DOMove(new Vector3(direction.normalized.x,

View File

@ -1,3 +1,4 @@
using Units;
using UnityEngine; using UnityEngine;
namespace Weapons namespace Weapons
@ -5,13 +6,12 @@ namespace Weapons
public class WeaponView : MonoBehaviour public class WeaponView : MonoBehaviour
{ {
public Weapon Weapon { get; private set; } 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; Weapon = weapon;
} Unit = unit;
}
} }
} }