diff --git a/Assets/Prefabs/Enemies/Enemy.prefab b/Assets/Prefabs/Enemies/Enemy.prefab index 6628bf6..d9c3e27 100644 --- a/Assets/Prefabs/Enemies/Enemy.prefab +++ b/Assets/Prefabs/Enemies/Enemy.prefab @@ -30,7 +30,8 @@ Transform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: [] + m_Children: + - {fileID: 4199099976017055095} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &369596802107988542 @@ -48,7 +49,19 @@ MonoBehaviour: startHealth: 100 OnHealthZero: m_PersistentCalls: - m_Calls: [] + m_Calls: + - m_Target: {fileID: 369596802107988542} + m_TargetAssemblyTypeName: HealthComponent, Assembly-CSharp + m_MethodName: SimpleKill + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 OnHealthChange: m_PersistentCalls: m_Calls: [] @@ -71,3 +84,247 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: MoneyDropOnDeath: 0 +--- !u!1 &5644288195509349706 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4199099976017055095} + - component: {fileID: 4915168525079258058} + - component: {fileID: 6292430518164601119} + - component: {fileID: 4916122593163076045} + - component: {fileID: 4754634268177203569} + m_Layer: 0 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4199099976017055095 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5644288195509349706} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8945555058150784166} + m_Father: {fileID: 8711060493889635308} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 529.5, y: 298} + m_SizeDelta: {x: 1059, y: 596} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!223 &4915168525079258058 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5644288195509349706} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 2 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_VertexColorAlwaysGammaSpace: 0 + m_AdditionalShaderChannelsFlag: 0 + m_UpdateRectTransformForStandalone: 0 + m_SortingLayerID: -344656299 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!114 &6292430518164601119 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5644288195509349706} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 1 +--- !u!114 &4916122593163076045 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5644288195509349706} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &4754634268177203569 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5644288195509349706} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a3cef6d37caa7c467b68369285a9ac2a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &5654329235174420066 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 4199099976017055095} + m_Modifications: + - target: {fileID: 634320244947008827, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: attachHealth + value: + objectReference: {fileID: 369596802107988542} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_Pivot.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_Pivot.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_AnchorMin.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_SizeDelta.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_SizeDelta.y + value: 0.26 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5650998000461597353, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_Name + value: HealthBar + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 1436120f3fce990d6ad280ccb90837ad, type: 3} +--- !u!224 &8945555058150784166 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + m_PrefabInstance: {fileID: 5654329235174420066} + m_PrefabAsset: {fileID: 0} diff --git a/Assets/Prefabs/Towers/BaseTower.prefab b/Assets/Prefabs/Towers/BaseTower.prefab index 4bc7203..d3e66a6 100644 --- a/Assets/Prefabs/Towers/BaseTower.prefab +++ b/Assets/Prefabs/Towers/BaseTower.prefab @@ -425,172 +425,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 56e3a423572a813999ef1a5b4d613178, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!1 &6053929021546264277 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 305161391166777012} - - component: {fileID: 6080690796046464904} - - component: {fileID: 5350365205670160062} - m_Layer: 8 - m_Name: Fill - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &305161391166777012 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6053929021546264277} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 629681681890783641} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -0.0024999976} - m_SizeDelta: {x: -0.2, y: -0.14500001} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &6080690796046464904 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6053929021546264277} - m_CullTransparentMesh: 1 ---- !u!114 &5350365205670160062 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6053929021546264277} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 0 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300000, guid: e065f0dd3e974200e9cee2ec8fe28f67, type: 3} - m_Type: 3 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 0 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 1 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!1 &8398575655800056308 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 629681681890783641} - - component: {fileID: 4781651999869071551} - - component: {fileID: 7981059992877442340} - - component: {fileID: 3615355125446991462} - m_Layer: 8 - m_Name: HealthBar - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &629681681890783641 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8398575655800056308} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 305161391166777012} - m_Father: {fileID: 5000648575824335922} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 1, y: 0} - m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 1, y: 0.26} - m_Pivot: {x: 1, y: 0} ---- !u!222 &4781651999869071551 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8398575655800056308} - m_CullTransparentMesh: 1 ---- !u!114 &7981059992877442340 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8398575655800056308} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 17c276e38a63bb550a2ea61a38e02dbb, type: 3} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!114 &3615355125446991462 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8398575655800056308} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e4732ff957835e7cfb6d8aa387c9a3fb, type: 3} - m_Name: - m_EditorClassIdentifier: - healthBar: {fileID: 5350365205670160062} - attachHealth: {fileID: 7883233016828513649} --- !u!1001 &2147029337253988588 PrefabInstance: m_ObjectHideFlags: 0 @@ -676,3 +510,132 @@ Transform: type: 3} m_PrefabInstance: {fileID: 2147029337253988588} m_PrefabAsset: {fileID: 0} +--- !u!1001 &4242914981235942237 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 5000648575824335922} + m_Modifications: + - target: {fileID: 634320244947008827, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: attachHealth + value: + objectReference: {fileID: 7883233016828513649} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_Pivot.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_Pivot.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_AnchorMin.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_SizeDelta.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_SizeDelta.y + value: 0.26 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5650998000461597353, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + propertyPath: m_Name + value: HealthBar + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 1436120f3fce990d6ad280ccb90837ad, type: 3} +--- !u!224 &629681681890783641 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 3628995943210930884, guid: 1436120f3fce990d6ad280ccb90837ad, + type: 3} + m_PrefabInstance: {fileID: 4242914981235942237} + m_PrefabAsset: {fileID: 0} diff --git a/Assets/Prefabs/UI/HealthBar.prefab b/Assets/Prefabs/UI/HealthBar.prefab new file mode 100644 index 0000000..7780096 --- /dev/null +++ b/Assets/Prefabs/UI/HealthBar.prefab @@ -0,0 +1,168 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &5650998000461597353 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3628995943210930884} + - component: {fileID: 8699278389887570914} + - component: {fileID: 6062891237085202041} + - component: {fileID: 634320244947008827} + m_Layer: 8 + m_Name: HealthBar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3628995943210930884 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5650998000461597353} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4530051785811330537} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 1, y: 0.26} + m_Pivot: {x: 1, y: 0} +--- !u!222 &8699278389887570914 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5650998000461597353} + m_CullTransparentMesh: 1 +--- !u!114 &6062891237085202041 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5650998000461597353} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 17c276e38a63bb550a2ea61a38e02dbb, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &634320244947008827 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5650998000461597353} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e4732ff957835e7cfb6d8aa387c9a3fb, type: 3} + m_Name: + m_EditorClassIdentifier: + healthBar: {fileID: 8115922470157157859} + attachHealth: {fileID: 0} +--- !u!1 &7990015676245939592 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4530051785811330537} + - component: {fileID: 7963253362287596757} + - component: {fileID: 8115922470157157859} + m_Layer: 8 + m_Name: Fill + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4530051785811330537 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7990015676245939592} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 3628995943210930884} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: -0.0024999976} + m_SizeDelta: {x: -0.2, y: -0.14500001} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &7963253362287596757 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7990015676245939592} + m_CullTransparentMesh: 1 +--- !u!114 &8115922470157157859 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7990015676245939592} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: e065f0dd3e974200e9cee2ec8fe28f67, type: 3} + m_Type: 3 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 0 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 1 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 diff --git a/Assets/Prefabs/UI/HealthBar.prefab.meta b/Assets/Prefabs/UI/HealthBar.prefab.meta new file mode 100644 index 0000000..92e7a7b --- /dev/null +++ b/Assets/Prefabs/UI/HealthBar.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1436120f3fce990d6ad280ccb90837ad +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Utilities/TowerDeleter.cs b/Assets/Scripts/Utilities/TowerDeleter.cs index 24dd353..e40e617 100644 --- a/Assets/Scripts/Utilities/TowerDeleter.cs +++ b/Assets/Scripts/Utilities/TowerDeleter.cs @@ -4,7 +4,7 @@ public class TowerDeleter : MonoBehaviour { public void Delete() { - Tower tower = transform.root.GetComponentInChildren(); + Tower tower = transform.parent.parent.GetComponentInChildren(); Destroy(tower.gameObject); } }