diff --git a/Assets/Prefabs/Towers/BlackHole.prefab b/Assets/Prefabs/Towers/BlackHole.prefab index d07b9ef..694489f 100644 --- a/Assets/Prefabs/Towers/BlackHole.prefab +++ b/Assets/Prefabs/Towers/BlackHole.prefab @@ -329,12 +329,12 @@ PrefabInstance: - target: {fileID: 4220667717328304921, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} propertyPath: m_LocalRotation.y - value: -0.00000001990998 + value: -0.00000001785987 objectReference: {fileID: 0} - target: {fileID: 4220667717328304921, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} propertyPath: m_LocalRotation.z - value: -3.6221226e-10 + value: -3.2491562e-10 objectReference: {fileID: 0} - target: {fileID: 5565472806559733162, guid: f54a14318952c90c5b47a300aedb0d15, type: 3} diff --git a/Assets/Scenes/TowerPlacement.unity b/Assets/Scenes/TowerPlacement.unity index 5a0b738..fb173f0 100644 --- a/Assets/Scenes/TowerPlacement.unity +++ b/Assets/Scenes/TowerPlacement.unity @@ -171,6 +171,119 @@ MonoBehaviour: m_EditorClassIdentifier: RebuildGrid: 0 SilhouetteMaterial: {fileID: 2100000, guid: 0610eb89b05f0b546929db3664a351d8, type: 2} +--- !u!21 &103411599 +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!21 &233895429 +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!1 &240436525 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 240436526} + m_Layer: 0 + m_Name: Waypoint (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &240436526 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 240436525} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.82, z: 6.45} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1278148243} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!21 &248483236 Material: serializedVersion: 8 @@ -377,6 +490,88 @@ MonoBehaviour: m_LightCookieSize: {x: 1, y: 1} m_LightCookieOffset: {x: 0, y: 0} m_SoftShadowQuality: 0 +--- !u!21 &749564851 +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 &778760732 +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 &824310134 Material: serializedVersion: 8 @@ -418,6 +613,135 @@ Material: - _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 &901079067 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 901079068} + m_Layer: 0 + m_Name: Waypoint + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &901079068 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 901079067} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 6.45} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1278148243} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &903034628 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 167310329963132665, guid: 9d875dda41d470948bbe6fd408a7e835, + type: 3} + m_PrefabInstance: {fileID: 2331233393358520666} + m_PrefabAsset: {fileID: 0} +--- !u!114 &903034631 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 903034628} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7355133f21643b44e8b997303686916c, type: 3} + m_Name: + m_EditorClassIdentifier: + WaypointRadiusTolerence: 0.01 + Waypoints: + - {fileID: 901079068} + - {fileID: 240436526} + - {fileID: 1932867447} + - {fileID: 923150806} + DebugPrefab: {fileID: 919132149155446097, guid: 18a302e9a279644c19653ac58e191809, + type: 3} +--- !u!1 &923150805 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 923150806} + m_Layer: 0 + m_Name: Waypoint (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &923150806 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 923150805} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 1.11, y: 1.82, z: 4.63} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1278148243} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!21 &1009945405 +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!1001 &1039229583 PrefabInstance: m_ObjectHideFlags: 0 @@ -431,6 +755,26 @@ PrefabInstance: propertyPath: m_Name value: GameUI objectReference: {fileID: 0} + - target: {fileID: 774744338376071623, guid: 0a81f2c7ca749af478944c043ef306dc, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 774744338376071623, guid: 0a81f2c7ca749af478944c043ef306dc, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 774744338376071623, guid: 0a81f2c7ca749af478944c043ef306dc, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 774744338376071623, guid: 0a81f2c7ca749af478944c043ef306dc, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 2757975024506450034, guid: 0a81f2c7ca749af478944c043ef306dc, type: 3} propertyPath: m_Material @@ -546,6 +890,26 @@ PrefabInstance: propertyPath: m_Material value: objectReference: {fileID: 1721603329} + - target: {fileID: 3735913226073384232, guid: 0a81f2c7ca749af478944c043ef306dc, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3735913226073384232, guid: 0a81f2c7ca749af478944c043ef306dc, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3735913226073384232, guid: 0a81f2c7ca749af478944c043ef306dc, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3735913226073384232, guid: 0a81f2c7ca749af478944c043ef306dc, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 3990110949884708462, guid: 0a81f2c7ca749af478944c043ef306dc, type: 3} propertyPath: m_Material @@ -556,11 +920,71 @@ PrefabInstance: propertyPath: m_Material value: objectReference: {fileID: 824310134} + - target: {fileID: 4848966849677167603, guid: 0a81f2c7ca749af478944c043ef306dc, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4848966849677167603, guid: 0a81f2c7ca749af478944c043ef306dc, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4848966849677167603, guid: 0a81f2c7ca749af478944c043ef306dc, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4848966849677167603, guid: 0a81f2c7ca749af478944c043ef306dc, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 4992629952180980787, guid: 0a81f2c7ca749af478944c043ef306dc, type: 3} propertyPath: m_Material value: objectReference: {fileID: 1407489464} + - target: {fileID: 7402271907180742918, guid: 0a81f2c7ca749af478944c043ef306dc, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7402271907180742918, guid: 0a81f2c7ca749af478944c043ef306dc, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7402271907180742918, guid: 0a81f2c7ca749af478944c043ef306dc, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7402271907180742918, guid: 0a81f2c7ca749af478944c043ef306dc, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7535063074468933406, guid: 0a81f2c7ca749af478944c043ef306dc, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7535063074468933406, guid: 0a81f2c7ca749af478944c043ef306dc, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7535063074468933406, guid: 0a81f2c7ca749af478944c043ef306dc, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7535063074468933406, guid: 0a81f2c7ca749af478944c043ef306dc, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 8443057073470027503, guid: 0a81f2c7ca749af478944c043ef306dc, type: 3} propertyPath: m_Material @@ -576,6 +1000,41 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 0a81f2c7ca749af478944c043ef306dc, type: 3} +--- !u!1 &1278148242 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1278148243} + m_Layer: 0 + m_Name: Waypoints + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1278148243 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1278148242} + serializedVersion: 2 + 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: 901079068} + - {fileID: 240436526} + - {fileID: 1932867447} + - {fileID: 923150806} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &1287631730 stripped Transform: m_CorrespondingSourceObject: {fileID: 2739991145043243501, guid: 0c13e24f92c86f84a85c76e0bca22830, @@ -1023,6 +1482,160 @@ Material: - _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!21 &1836645083 +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 &1932867446 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1932867447} + m_Layer: 0 + m_Name: Waypoint (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1932867447 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1932867446} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.82, z: 4.63} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1278148243} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!21 &1962086325 +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: 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!21 &1977259215 +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!1001 &2331233393358520666 PrefabInstance: m_ObjectHideFlags: 0 @@ -1089,7 +1702,11 @@ PrefabInstance: m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] - m_AddedComponents: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 167310329963132665, guid: 9d875dda41d470948bbe6fd408a7e835, + type: 3} + insertIndex: -1 + addedObject: {fileID: 903034631} m_SourcePrefab: {fileID: 100100000, guid: 9d875dda41d470948bbe6fd408a7e835, type: 3} --- !u!1001 &8480757413362724446 PrefabInstance: @@ -1178,3 +1795,4 @@ SceneRoots: - {fileID: 510617950} - {fileID: 444480} - {fileID: 1039229583} + - {fileID: 1278148243} diff --git a/Assets/Scripts/Manager/MoneyManager.cs b/Assets/Scripts/Manager/MoneyManager.cs index a1ee641..8f08f6b 100644 --- a/Assets/Scripts/Manager/MoneyManager.cs +++ b/Assets/Scripts/Manager/MoneyManager.cs @@ -7,7 +7,7 @@ using UnityEngine.Assertions; public class MoneyManager : MonoBehaviour { - public TowerCollection towerCollection; + public EnemyCollection towerCollection; [Space(10)] public GameObject[] ShopButtons; public TMP_Text[] MoneyTexts; diff --git a/Assets/Scripts/Manager/WaypointSystemManager.cs b/Assets/Scripts/Manager/WaypointSystemManager.cs new file mode 100644 index 0000000..e9ede6d --- /dev/null +++ b/Assets/Scripts/Manager/WaypointSystemManager.cs @@ -0,0 +1,88 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using System.Linq; +using System; + +public class WaypointSystemManager : MonoBehaviour +{ + public static WaypointSystemManager Instance; + + [SerializeField] private float WaypointRadiusTolerence = 0.01f; + [SerializeField] private List Waypoints; + + [SerializeField] public List activeEntities = new(); + + public GameObject DebugPrefab; + + private void OnEnable() + { + if (Instance != null) + Destroy(Instance); + Instance = this; + } + + private void Start() + { + var data = new WaypointEntityData(); + data.Entity = Instantiate(DebugPrefab).transform; + data.MoveSpeed = 1; + + AddObjectToPath(data); + } + + private void Update() + { + for (int i = 0; i < activeEntities.Count; i++) + { + var data = activeEntities[i]; + + // Check if entity still exists + if (data.Entity == null) + { + activeEntities.RemoveAt(i); + continue; + } + + // Set target if no target + if (data.NextTargetPosition == null) + data.NextTargetPosition = Waypoints[0]; + + // Changes target if within tolerence + if (Vector3.Distance(data.Entity.position, data.NextTargetPosition.position) < WaypointRadiusTolerence) + { + int index = Waypoints.IndexOf(data.NextTargetPosition); + + if (index + 1 >= Waypoints.Count) + { + Destroy(data.Entity.gameObject); // Destroy object when finish waypoints + } + else + { + data.NextTargetPosition = Waypoints[index + 1]; + } + } + + // Move object by speed + Vector3 targetDirection = data.NextTargetPosition.position - data.Entity.position; + Vector3 normTargetDir = targetDirection.normalized; + + float dist = Vector3.Distance(data.Entity.position, data.NextTargetPosition.position); + float minDist = Math.Min(dist, data.MoveSpeed * Time.deltaTime); + + data.Entity.position += normTargetDir * minDist; + } + } + + public void AddObjectToPath(WaypointEntityData data) + { + activeEntities.Add(data); + } +} + +public class WaypointEntityData +{ + public Transform Entity; + public Transform NextTargetPosition; + public float MoveSpeed; +} diff --git a/Assets/Scripts/Manager/WaypointSystemManager.cs.meta b/Assets/Scripts/Manager/WaypointSystemManager.cs.meta new file mode 100644 index 0000000..6a424f5 --- /dev/null +++ b/Assets/Scripts/Manager/WaypointSystemManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7355133f21643b44e8b997303686916c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: