stop following on destroy

camera
This commit is contained in:
kimrdd 2024-04-21 12:15:21 +02:00
parent 40a4bd45ca
commit 40c90226cc
5 changed files with 436 additions and 358 deletions

View File

@ -586,6 +586,7 @@ GameObject:
- component: {fileID: 6162594480593627889}
- component: {fileID: 5831827090361496139}
- component: {fileID: 1880671857495123661}
- component: {fileID: 6501708406546051540}
m_Layer: 0
m_Name: TowerCam
m_TagString: Untagged
@ -785,3 +786,23 @@ MonoBehaviour:
m_Offset: {x: 0, y: 0, z: 0}
m_ApplyAfter: 0
m_PreserveComposition: 0
--- !u!114 &6501708406546051540
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7612880158138396871}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0aa8da13840a5cb43997aca17b09b15d, type: 3}
m_Name:
m_EditorClassIdentifier:
target: {fileID: 0}
origin: {fileID: 7612880158138396871}
towerCamScript: {fileID: 0}
hideFadeSpeed: 2
showFadeSpeed: 7
sphereRadius: 2
sphereRange: 10
sphereOffset: {x: 0, y: 2, z: 0}

View File

@ -123,88 +123,6 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!21 &30339316
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/IndependentRoundedCorners
m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _halfSize: {r: 97.8265, g: 37.763, b: 0, a: 0}
- _r: {r: 30.96, g: 0, b: 0, a: 0}
- _rect2props: {r: 7.7400208, g: -7.7400017, b: 84.93025, a: 95.87626}
m_BuildTextureStacks: []
--- !u!21 &34326813
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/IndependentRoundedCorners
m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _halfSize: {r: 5, g: 13.05, b: 0, a: 0}
- _r: {r: 0, g: 0, b: 5, a: 5}
- _rect2props: {r: 0.00000047683716, g: 2.4999986, b: 10.995511, a: 10.995511}
m_BuildTextureStacks: []
--- !u!20 &57718964 stripped
Camera:
m_CorrespondingSourceObject: {fileID: 3255403189825384754, guid: fd9f9b61c0ebb324ebc9f929e26706bc,
@ -315,6 +233,47 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 66896262}
m_PrefabAsset: {fileID: 0}
--- !u!21 &101363708
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/IndependentRoundedCorners
m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _halfSize: {r: 97.85, g: 477.754, b: 0, a: 0}
- _r: {r: 0, g: 0, b: 0, a: 40}
- _rect2props: {r: 10, g: 9.999939, b: 407.01352, a: 392.87137}
m_BuildTextureStacks: []
--- !u!21 &110256343
Material:
serializedVersion: 8
@ -397,6 +356,47 @@ Material:
- _r: {r: 0, g: 0, b: 0, a: 40}
- _rect2props: {r: 10, g: 9.999939, b: 407.01352, a: 392.87137}
m_BuildTextureStacks: []
--- !u!21 &170343229
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/IndependentRoundedCorners
m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _halfSize: {r: 5, g: 13.05, b: 0, a: 0}
- _r: {r: 5, g: 5, b: 0, a: 0}
- _rect2props: {r: 0, g: -2.500002, b: 10.995511, a: 10.995511}
m_BuildTextureStacks: []
--- !u!1001 &203396308
PrefabInstance:
m_ObjectHideFlags: 0
@ -1153,6 +1153,47 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 443970459}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!21 &460239444
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/IndependentRoundedCorners
m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _halfSize: {r: 360, g: 550, b: 0, a: 0}
- _r: {r: 0, g: 59.4, b: 59.4, a: 59.4}
- _rect2props: {r: -14.850006, g: 14.849915, b: 622.4661, a: 601.4651}
m_BuildTextureStacks: []
--- !u!1 &463101172
GameObject:
m_ObjectHideFlags: 0
@ -1270,47 +1311,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7355133f21643b44e8b997303686916c, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!21 &549491337
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/IndependentRoundedCorners
m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _halfSize: {r: 5, g: 13.05, b: 0, a: 0}
- _r: {r: 5, g: 5, b: 0, a: 0}
- _rect2props: {r: 0, g: -2.500002, b: 10.995511, a: 10.995511}
m_BuildTextureStacks: []
--- !u!1 &739155301
GameObject:
m_ObjectHideFlags: 0
@ -1481,6 +1481,47 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c2cdf8a35ccaacc4695675d2ada4aecf, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!21 &789609843
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/IndependentRoundedCorners
m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _halfSize: {r: 97.8265, g: 37.763, b: 0, a: 0}
- _r: {r: 30.96, g: 0, b: 0, a: 0}
- _rect2props: {r: 7.7400208, g: -7.7400017, b: 84.93025, a: 95.87626}
m_BuildTextureStacks: []
--- !u!21 &797956095
Material:
serializedVersion: 8
@ -1627,6 +1668,47 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 846938778}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!21 &893879482
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/IndependentRoundedCorners
m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _halfSize: {r: 36.5705, g: 37.7215, b: 0, a: 0}
- _r: {r: 40, g: 0, b: 0, a: 40}
- _rect2props: {r: 20, g: -0.0000076293945, b: 38.390244, a: 38.390244}
m_BuildTextureStacks: []
--- !u!1 &922758185
GameObject:
m_ObjectHideFlags: 0
@ -1768,6 +1850,26 @@ PrefabInstance:
propertyPath: m_LocalRotation.x
value: -0.05019385
objectReference: {fileID: 0}
- target: {fileID: 2465233980315321778, guid: fd9f9b61c0ebb324ebc9f929e26706bc,
type: 3}
propertyPath: m_LocalRotation.z
value: 0.5715319
objectReference: {fileID: 0}
- target: {fileID: 2981308973353539976, guid: fd9f9b61c0ebb324ebc9f929e26706bc,
type: 3}
propertyPath: m_LocalPosition.x
value: 4.584422
objectReference: {fileID: 0}
- target: {fileID: 2981308973353539976, guid: fd9f9b61c0ebb324ebc9f929e26706bc,
type: 3}
propertyPath: m_LocalPosition.y
value: -16.898224
objectReference: {fileID: 0}
- target: {fileID: 2981308973353539976, guid: fd9f9b61c0ebb324ebc9f929e26706bc,
type: 3}
propertyPath: m_LocalPosition.z
value: 6.807704
objectReference: {fileID: 0}
- target: {fileID: 2981308973353539976, guid: fd9f9b61c0ebb324ebc9f929e26706bc,
type: 3}
propertyPath: m_LocalRotation.w
@ -1778,6 +1880,26 @@ PrefabInstance:
propertyPath: m_LocalRotation.x
value: -0.05019385
objectReference: {fileID: 0}
- target: {fileID: 2981308973353539976, guid: fd9f9b61c0ebb324ebc9f929e26706bc,
type: 3}
propertyPath: m_LocalRotation.z
value: 0.5715319
objectReference: {fileID: 0}
- target: {fileID: 3313768392743891090, guid: fd9f9b61c0ebb324ebc9f929e26706bc,
type: 3}
propertyPath: origin
value:
objectReference: {fileID: 949771675}
- target: {fileID: 3313768392743891090, guid: fd9f9b61c0ebb324ebc9f929e26706bc,
type: 3}
propertyPath: originalTarget
value:
objectReference: {fileID: 1043201808}
- target: {fileID: 3665490202611795451, guid: fd9f9b61c0ebb324ebc9f929e26706bc,
type: 3}
propertyPath: m_LocalPosition.y
value: -7.5
objectReference: {fileID: 0}
- target: {fileID: 5753661378891917460, guid: fd9f9b61c0ebb324ebc9f929e26706bc,
type: 3}
propertyPath: m_LocalRotation.w
@ -1788,6 +1910,36 @@ PrefabInstance:
propertyPath: m_LocalRotation.x
value: -0.048121
objectReference: {fileID: 0}
- target: {fileID: 6115888582170302332, guid: fd9f9b61c0ebb324ebc9f929e26706bc,
type: 3}
propertyPath: m_LocalPosition.y
value: 2.5
objectReference: {fileID: 0}
- target: {fileID: 7348612162646443967, guid: fd9f9b61c0ebb324ebc9f929e26706bc,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7348612162646443967, guid: fd9f9b61c0ebb324ebc9f929e26706bc,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.07442062
objectReference: {fileID: 0}
- target: {fileID: 7348612162646443967, guid: fd9f9b61c0ebb324ebc9f929e26706bc,
type: 3}
propertyPath: m_LocalRotation.x
value: -0.045994468
objectReference: {fileID: 0}
- target: {fileID: 7348612162646443967, guid: fd9f9b61c0ebb324ebc9f929e26706bc,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.8473892
objectReference: {fileID: 0}
- target: {fileID: 7348612162646443967, guid: fd9f9b61c0ebb324ebc9f929e26706bc,
type: 3}
propertyPath: m_LocalRotation.z
value: 0.52371526
objectReference: {fileID: 0}
- target: {fileID: 8510394576666186474, guid: fd9f9b61c0ebb324ebc9f929e26706bc,
type: 3}
propertyPath: towerCam
@ -1848,6 +2000,12 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: fd9f9b61c0ebb324ebc9f929e26706bc, type: 3}
--- !u!1 &949771675 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 6163557566655415017, guid: fd9f9b61c0ebb324ebc9f929e26706bc,
type: 3}
m_PrefabInstance: {fileID: 929277189}
m_PrefabAsset: {fileID: 0}
--- !u!21 &962107812
Material:
serializedVersion: 8
@ -2114,47 +2272,12 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 1016399493}
m_PrefabAsset: {fileID: 0}
--- !u!21 &1113139868
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
--- !u!1 &1043201808 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 5419760417237671588, guid: fd9f9b61c0ebb324ebc9f929e26706bc,
type: 3}
m_PrefabInstance: {fileID: 929277189}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/IndependentRoundedCorners
m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _halfSize: {r: 340.1145, g: 535, b: 0, a: 0}
- _r: {r: 0, g: 0, b: 0, a: 40}
- _rect2props: {r: 10.0000305, g: 9.999878, b: 618.79944, a: 604.6573}
m_BuildTextureStacks: []
--- !u!1 &1117810916
GameObject:
m_ObjectHideFlags: 0
@ -2365,47 +2488,6 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1211328792}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!21 &1245510236
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/IndependentRoundedCorners
m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _halfSize: {r: 360, g: 550, b: 0, a: 0}
- _r: {r: 0, g: 59.4, b: 59.4, a: 59.4}
- _rect2props: {r: -14.850006, g: 14.849915, b: 622.4661, a: 601.4651}
m_BuildTextureStacks: []
--- !u!114 &1335003908 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4274405463174037481, guid: 04b33788ffcc15e4e8f74ae3b8d95dc3,
@ -2430,47 +2512,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: bb343e5418f1e1144aab7c51b7482da7, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!21 &1415767759
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/IndependentRoundedCorners
m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _halfSize: {r: 35.4485, g: 38.0555, b: 0, a: 0}
- _r: {r: 40, g: 0, b: 0, a: 40}
- _rect2props: {r: 20.000002, g: -0.0000038146973, b: 37.833046, a: 37.833046}
m_BuildTextureStacks: []
--- !u!21 &1454190399
Material:
serializedVersion: 8
@ -2658,6 +2699,47 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1483033597}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!21 &1501432255
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/IndependentRoundedCorners
m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _halfSize: {r: 5, g: 13.05, b: 0, a: 0}
- _r: {r: 0, g: 0, b: 5, a: 5}
- _rect2props: {r: 0.00000047683716, g: 2.4999986, b: 10.995511, a: 10.995511}
m_BuildTextureStacks: []
--- !u!1 &1515922344
GameObject:
m_ObjectHideFlags: 0
@ -2695,6 +2777,47 @@ Transform:
- {fileID: 779612216}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!21 &1540710790
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/IndependentRoundedCorners
m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _halfSize: {r: 35.4485, g: 38.0555, b: 0, a: 0}
- _r: {r: 40, g: 0, b: 0, a: 40}
- _rect2props: {r: 20.000002, g: -0.0000038146973, b: 37.833046, a: 37.833046}
m_BuildTextureStacks: []
--- !u!21 &1553206229
Material:
serializedVersion: 8
@ -2835,7 +2958,7 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 1554436711}
m_PrefabAsset: {fileID: 0}
--- !u!21 &1565628770
--- !u!21 &1597628486
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
@ -2872,9 +2995,9 @@ Material:
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _halfSize: {r: 97.85, g: 477.754, b: 0, a: 0}
- _halfSize: {r: 340.1145, g: 535, b: 0, a: 0}
- _r: {r: 0, g: 0, b: 0, a: 40}
- _rect2props: {r: 10, g: 9.999939, b: 407.01352, a: 392.87137}
- _rect2props: {r: 10.0000305, g: 9.999878, b: 618.79944, a: 604.6573}
m_BuildTextureStacks: []
--- !u!1 &1644633573
GameObject:
@ -3394,47 +3517,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
TargetCarveGrid: {fileID: 1812668202}
--- !u!21 &2040596485
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/IndependentRoundedCorners
m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _halfSize: {r: 36.5705, g: 37.7215, b: 0, a: 0}
- _r: {r: 40, g: 0, b: 0, a: 40}
- _rect2props: {r: 20, g: -0.0000076293945, b: 38.390244, a: 38.390244}
m_BuildTextureStacks: []
--- !u!1001 &2074753046
PrefabInstance:
m_ObjectHideFlags: 0
@ -3493,62 +3575,23 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1880671857495123661, guid: 1c668d8e87e6aee4a8527281f0b61954,
- target: {fileID: 6501708406546051540, guid: 1c668d8e87e6aee4a8527281f0b61954,
type: 3}
propertyPath: m_Offset.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1880671857495123661, guid: 1c668d8e87e6aee4a8527281f0b61954,
propertyPath: origin
value:
objectReference: {fileID: 949771675}
- target: {fileID: 6501708406546051540, guid: 1c668d8e87e6aee4a8527281f0b61954,
type: 3}
propertyPath: m_ApplyAfter
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1880671857495123661, guid: 1c668d8e87e6aee4a8527281f0b61954,
type: 3}
propertyPath: m_PreserveComposition
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3685285690701009546, guid: 1c668d8e87e6aee4a8527281f0b61954,
type: 3}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3685285690701009546, guid: 1c668d8e87e6aee4a8527281f0b61954,
type: 3}
propertyPath: sphereOffset.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5831827090361496139, guid: 1c668d8e87e6aee4a8527281f0b61954,
type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5831827090361496139, guid: 1c668d8e87e6aee4a8527281f0b61954,
type: 3}
propertyPath: scrollSpeed
value: 2.5
objectReference: {fileID: 0}
- target: {fileID: 5831827090361496139, guid: 1c668d8e87e6aee4a8527281f0b61954,
type: 3}
propertyPath: stopAfterTime
value: 5
objectReference: {fileID: 0}
- target: {fileID: 6162594480593627889, guid: 1c668d8e87e6aee4a8527281f0b61954,
type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
propertyPath: towerCamScript
value:
objectReference: {fileID: 1346132657}
- target: {fileID: 7612880158138396871, guid: 1c668d8e87e6aee4a8527281f0b61954,
type: 3}
propertyPath: m_Name
value: TowerCam
objectReference: {fileID: 0}
- target: {fileID: 9015098249639605300, guid: 1c668d8e87e6aee4a8527281f0b61954,
type: 3}
propertyPath: m_YAxis.Value
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedComponents:
- {fileID: 6501708406546051540, guid: 1c668d8e87e6aee4a8527281f0b61954, type: 3}
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []

View File

@ -3,31 +3,35 @@ using UnityEngine;
public class HideWall : MonoBehaviour
{
[SerializeField] private GameObject target;
[SerializeField] private GameObject origin;
public static HideWall instance;
[SerializeField] private TowerCam towerCamScript;
[SerializeField] private GameObject originalTarget;
public GameObject target;
[SerializeField] private GameObject origin;
[Range(1f, 10f)] public float hideFadeSpeed;
[Range(1f, 10f)] public float showFadeSpeed;
public float sphereRadius;
[Range(0, 100)] public float sphereRange;
public Vector3 sphereOffset;
float maxSphereRayDistance;
private List<GameObject> prevHitObjects = new List<GameObject>();
private void Start()
{
if (instance == null)
instance = this;
}
void Update()
{
if (target == null && towerCamScript != null)
{
target = towerCamScript.newTarget;
}
if (target == null)
target = originalTarget;
maxSphereRayDistance = Vector3.Distance(origin.transform.position, target.transform.position) - (sphereRadius * 2) + sphereRange;
maxSphereRayDistance = Vector3.Distance(origin.transform.position, target.transform.position) - (sphereRadius);
Vector3 direction = ((target.transform.position + sphereOffset) - origin.transform.position).normalized;
Vector3 direction = (target.transform.position - origin.transform.position).normalized;
RaycastHit[] hits = Physics.SphereCastAll(origin.transform.position, sphereRadius, direction, maxSphereRayDistance);
List<GameObject> hitObjectsThisFrame = new List<GameObject>();
@ -69,5 +73,9 @@ public class HideWall : MonoBehaviour
{
Gizmos.color = Color.red;
Gizmos.DrawWireSphere(origin.transform.position, sphereRadius);
maxSphereRayDistance = Vector3.Distance(origin.transform.position, target.transform.position) - (sphereRadius);
Vector3 direction = (target.transform.position - origin.transform.position).normalized;
Gizmos.DrawRay(origin.transform.position, direction * maxSphereRayDistance);
}
}

View File

@ -3,9 +3,11 @@ using UnityEngine;
public class TowerCam : MonoBehaviour
{
public static TowerCam instance;
[SerializeField] private GameObject m_gameObject;
public GameObject newTarget;
public float originalOffset;
private void Start()
{
@ -15,27 +17,25 @@ public class TowerCam : MonoBehaviour
public void ChangeToTarget(GameObject target)
{
float originalOffset = m_gameObject.GetComponent<CinemachineCameraOffset>().m_Offset.z;
originalOffset = m_gameObject.GetComponent<CinemachineCameraOffset>().m_Offset.z;
if (target != null)
{
newTarget = target;
m_gameObject.GetComponent<CinemachineFreeLook>().m_LookAt = target.transform;
m_gameObject.GetComponent<CinemachineFreeLook>().m_Follow = target.transform;
m_gameObject.GetComponent<CinemachineFreeLook>().m_Priority = 11;
m_gameObject.GetComponent<CinemachineFreeLook>().GetRig(0).LookAt = target.transform;
m_gameObject.GetComponent<CinemachineFreeLook>().GetRig(1).LookAt = target.transform;
m_gameObject.GetComponent<CinemachineFreeLook>().GetRig(2).LookAt = target.transform;
m_gameObject.GetComponent<CinemachineCameraOffset>().m_Offset.z = 0;
HideWall.instance.target = target;
}
else
{
m_gameObject.GetComponent<CinemachineFreeLook>().m_Priority = 9;
m_gameObject.GetComponent<CinemachineCameraOffset>().m_Offset.z = originalOffset;
HideWall.instance.target = null;
}
}
}

View File

@ -1,7 +1,7 @@
using UnityEngine;
using UnityEngine.Events;
using System;
using Cinemachine;
public class HealthComponent : MonoBehaviour
{
[SerializeField] float startHealth = 100;
@ -38,6 +38,12 @@ public class HealthComponent : MonoBehaviour
{
CameraShake.instance.ShakeCamera(0.5f, 0.2f);
var cam = CinemachineCore.Instance.GetActiveBrain(0).ActiveVirtualCamera.Priority -= 1;
CinemachineCore.Instance.GetActiveBrain(0).ActiveVirtualCamera.VirtualCameraGameObject.GetComponent<CinemachineCameraOffset>().m_Offset.z = TowerCam.instance.originalOffset;
HideWall.instance.target = null;
Destroy(gameObject);
}
}