From: KG0104 <76601263+KG0104@users.noreply.github.com> Date: Fri, 13 Aug 2021 15:13:12 +0000 (+0200) Subject: komplette UI passt sich Aufloesung an X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=8307761c122a4feb99e67e8ff08b919dc0ad2a58;p=SuperMouseAdventure.git komplette UI passt sich Aufloesung an --- diff --git a/2DGame/Assets/Scenes/Green_Idyll/green_idyll_1.unity b/2DGame/Assets/Scenes/Green_Idyll/green_idyll_1.unity index 02122e9..bdf4015 100644 --- a/2DGame/Assets/Scenes/Green_Idyll/green_idyll_1.unity +++ b/2DGame/Assets/Scenes/Green_Idyll/green_idyll_1.unity @@ -1067,14 +1067,14 @@ RectTransform: m_GameObject: {fileID: 194630534} 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_LocalScale: {x: 0.22398925, y: 0.22398925, z: 0.22398925} m_Children: [] - m_Father: {fileID: 1107270362} - m_RootOrder: 9 + m_Father: {fileID: 1350018459} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 393.9453, y: 574.7948} + m_AnchoredPosition: {x: -148.53049, y: -67.111084} m_SizeDelta: {x: 51.541992, y: 51.541992} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &194630536 @@ -1518,7 +1518,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f037a06d9083052489faa3a9c37bb063, type: 3} m_Name: m_EditorClassIdentifier: - red: {fileID: 21300000, guid: 5a6911bfdef56e3438469bcb744038a5, type: 3} green: {fileID: 21300000, guid: f2a243993330e8e40857102cf3351e52, type: 3} --- !u!61 &214740915 BoxCollider2D: @@ -2555,14 +2554,14 @@ RectTransform: m_GameObject: {fileID: 270560369} 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_LocalScale: {x: 0.22398925, y: 0.22398925, z: 0.22398925} m_Children: [] - m_Father: {fileID: 1107270362} - m_RootOrder: 18 + m_Father: {fileID: 1350018459} + m_RootOrder: 10 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 330.54724, y: 454.1792} + m_AnchoredPosition: {x: -162.73099, y: -94.1277} m_SizeDelta: {x: 51.541992, y: 51.541992} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &270560371 @@ -2716,7 +2715,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 293.84, y: -56.725006} + m_AnchoredPosition: {x: 293.83997, y: -56.724976} m_SizeDelta: {x: 51.541992, y: 51.541992} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &311476190 @@ -2988,7 +2987,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 345.38, y: -56.725006} + m_AnchoredPosition: {x: 345.38, y: -56.724976} m_SizeDelta: {x: 51.541992, y: 51.541992} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &397286150 @@ -4210,7 +4209,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 56.725006, y: -56.725006} + m_AnchoredPosition: {x: 56.724976, y: -56.724976} m_SizeDelta: {x: 113.449005, y: 113.449005} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &471674079 @@ -4278,14 +4277,14 @@ RectTransform: m_GameObject: {fileID: 506468294} 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_LocalScale: {x: 0.22398925, y: 0.22398925, z: 0.22398925} m_Children: [] - m_Father: {fileID: 1107270362} - m_RootOrder: 17 + m_Father: {fileID: 1350018459} + m_RootOrder: 9 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 583.6256, y: 515} + m_AnchoredPosition: {x: -106.04412, y: -80.504486} m_SizeDelta: {x: 51.541992, y: 51.541992} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &506468296 @@ -10684,14 +10683,14 @@ RectTransform: m_GameObject: {fileID: 726379605} 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_LocalScale: {x: 0.22398925, y: 0.22398925, z: 0.22398925} m_Children: [] - m_Father: {fileID: 1107270362} - m_RootOrder: 14 + m_Father: {fileID: 1350018459} + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 393.94495, y: 515} + m_AnchoredPosition: {x: -148.5306, y: -80.50449} m_SizeDelta: {x: 51.541992, y: 51.541992} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &726379607 @@ -11405,14 +11404,14 @@ RectTransform: m_GameObject: {fileID: 816615894} 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_LocalScale: {x: 0.22398925, y: 0.22398925, z: 0.22398925} m_Children: [] - m_Father: {fileID: 1107270362} - m_RootOrder: 13 + m_Father: {fileID: 1350018459} + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 329, y: 515} + m_AnchoredPosition: {x: -163.07755, y: -80.50449} m_SizeDelta: {x: 51.541992, y: 51.541992} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &816615896 @@ -11763,14 +11762,14 @@ RectTransform: m_GameObject: {fileID: 867838449} 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_LocalScale: {x: 0.22398925, y: 0.22398925, z: 0.22398925} m_Children: [] - m_Father: {fileID: 1107270362} - m_RootOrder: 12 + m_Father: {fileID: 1350018459} + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 581.56555, y: 574.7948} + m_AnchoredPosition: {x: -106.505554, y: -67.111084} m_SizeDelta: {x: 51.541992, y: 51.541992} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &867838451 @@ -11999,7 +11998,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 190.76001, y: -56.725006} + m_AnchoredPosition: {x: 190.76001, y: -56.724976} m_SizeDelta: {x: 51.541992, y: 51.541992} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &896600233 @@ -12397,7 +12396,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 936765968} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -26, y: 2, z: 0} + m_LocalPosition: {x: 845, y: 10, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 972365582} @@ -12783,6 +12782,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d51b0901a7480d44791bc856ca71009c, type: 3} m_Name: m_EditorClassIdentifier: + cheeseCoinCollected: 0 cheeseCoin: {fileID: 169271316} cheeseCoinImage: {fileID: 1206416087} collectedCheeseCoin: {fileID: 8117218682855921839, guid: 66b5b43f13c5d554789457684b0bd6d8, @@ -13270,7 +13270,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 242.29999, y: -56.725006} + m_AnchoredPosition: {x: 242.29999, y: -56.724976} m_SizeDelta: {x: 51.541992, y: 51.541992} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &995274837 @@ -13342,7 +13342,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f037a06d9083052489faa3a9c37bb063, type: 3} m_Name: m_EditorClassIdentifier: - red: {fileID: 21300000, guid: 5a6911bfdef56e3438469bcb744038a5, type: 3} green: {fileID: 21300000, guid: f2a243993330e8e40857102cf3351e52, type: 3} --- !u!61 &1002661581 BoxCollider2D: @@ -13902,14 +13901,14 @@ RectTransform: m_GameObject: {fileID: 1029742217} 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_LocalScale: {x: 0.22398925, y: 0.22398925, z: 0.22398925} m_Children: [] - m_Father: {fileID: 1107270362} - m_RootOrder: 15 + m_Father: {fileID: 1350018459} + m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 457.85986, y: 515} + m_AnchoredPosition: {x: -134.2143, y: -80.50449} m_SizeDelta: {x: 51.541992, y: 51.541992} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1029742219 @@ -13981,7 +13980,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f037a06d9083052489faa3a9c37bb063, type: 3} m_Name: m_EditorClassIdentifier: - red: {fileID: 21300000, guid: 5a6911bfdef56e3438469bcb744038a5, type: 3} green: {fileID: 21300000, guid: f2a243993330e8e40857102cf3351e52, type: 3} --- !u!61 &1081637521 BoxCollider2D: @@ -14204,18 +14202,6 @@ RectTransform: - {fileID: 397286149} - {fileID: 423319632} - {fileID: 1350018459} - - {fileID: 1400477797} - - {fileID: 194630535} - - {fileID: 1864406219} - - {fileID: 1625269336} - - {fileID: 867838450} - - {fileID: 816615895} - - {fileID: 726379606} - - {fileID: 1029742218} - - {fileID: 1120992167} - - {fileID: 506468295} - - {fileID: 270560370} - - {fileID: 1605026744} m_Father: {fileID: 0} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -14375,14 +14361,14 @@ RectTransform: m_GameObject: {fileID: 1120992166} 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_LocalScale: {x: 0.22398925, y: 0.22398925, z: 0.22398925} m_Children: [] - m_Father: {fileID: 1107270362} - m_RootOrder: 16 + m_Father: {fileID: 1350018459} + m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 519.7107, y: 515} + m_AnchoredPosition: {x: -120.36037, y: -80.50449} m_SizeDelta: {x: 51.541992, y: 51.541992} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1120992168 @@ -24058,7 +24044,7 @@ TilemapCollider2D: m_GameObject: {fileID: 1146337034} m_Enabled: 1 m_Density: 1 - m_Material: {fileID: 0} + m_Material: {fileID: 6200000, guid: a0e76db9e40770140a1212c57564ee2a, type: 2} m_IsTrigger: 0 m_UsedByEffector: 0 m_UsedByComposite: 0 @@ -24392,7 +24378,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f037a06d9083052489faa3a9c37bb063, type: 3} m_Name: m_EditorClassIdentifier: - red: {fileID: 21300000, guid: 5a6911bfdef56e3438469bcb744038a5, type: 3} green: {fileID: 21300000, guid: f2a243993330e8e40857102cf3351e52, type: 3} --- !u!61 &1230926688 BoxCollider2D: @@ -25162,12 +25147,12 @@ MonoBehaviour: m_Calls: [] m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 + m_FontSize: 12 m_FontStyle: 0 m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 + m_MinSize: 0 + m_MaxSize: 98 + m_Alignment: 4 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 @@ -25192,14 +25177,26 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 4.4645, y: 4.4645, z: 4.4645} - m_Children: [] + m_Children: + - {fileID: 1400477797} + - {fileID: 194630535} + - {fileID: 1864406219} + - {fileID: 1625269336} + - {fileID: 867838450} + - {fileID: 816615895} + - {fileID: 726379606} + - {fileID: 1029742218} + - {fileID: 1120992167} + - {fileID: 506468295} + - {fileID: 270560370} + - {fileID: 1605026744} m_Father: {fileID: 1107270362} m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 831.3022, y: 774.36096} - m_SizeDelta: {x: 82.468, y: 15.463} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -127.599976, y: -50.91992} + m_SizeDelta: {x: 255.21997, y: 101.839966} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &1359769958 GameObject: @@ -25316,14 +25313,14 @@ RectTransform: m_GameObject: {fileID: 1400477796} 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_LocalScale: {x: 0.22398925, y: 0.22398925, z: 0.22398925} m_Children: [] - m_Father: {fileID: 1107270362} - m_RootOrder: 8 + m_Father: {fileID: 1350018459} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 329.00037, y: 574.7948} + m_AnchoredPosition: {x: -163.07748, y: -67.111084} m_SizeDelta: {x: 51.541992, y: 51.541992} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1400477798 @@ -25532,9 +25529,9 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: lastCheckpointPos: {x: 0, y: 0, z: 0} - cheese: {fileID: 0} - lastCheeseCount: 0 mouse: {fileID: 0} + lastCheeseCount: 0 + isCheeseCoinCollected: 0 --- !u!1 &1423339812 GameObject: m_ObjectHideFlags: 0 @@ -26432,7 +26429,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 139.22, y: -56.725006} + m_AnchoredPosition: {x: 139.21997, y: -56.724976} m_SizeDelta: {x: 51.541992, y: 51.541992} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1488509466 @@ -26655,10 +26652,10 @@ BoxCollider2D: m_Enabled: 1 m_Density: 1 m_Material: {fileID: 0} - m_IsTrigger: 1 + m_IsTrigger: 0 m_UsedByEffector: 0 m_UsedByComposite: 0 - m_Offset: {x: 0, y: 0} + m_Offset: {x: 33.60837, y: 29.407335} m_SpriteTilingProperty: border: {x: 0, y: 0, z: 0, w: 0} pivot: {x: 0, y: 0} @@ -26669,7 +26666,7 @@ BoxCollider2D: adaptiveTiling: 0 m_AutoTiling: 0 serializedVersion: 2 - m_Size: {x: 55.96305, y: 1} + m_Size: {x: 26.3086, y: 59.81467} m_EdgeRadius: 0 --- !u!4 &1527386856 Transform: @@ -26871,8 +26868,8 @@ MonoBehaviour: - {fileID: 1083000046} - {fileID: 363924768} m_Bounds: - m_Center: {x: -0.00000023841858, y: -0.00000023841858, z: 0} - m_Extent: {x: 3.2750006, y: 3.6150007, z: 0} + m_Center: {x: -0.00000023841858, y: 0.00000071525574, z: 0} + m_Extent: {x: 3.2750006, y: 3.6149998, z: 0} m_UseBatching: 1 m_AlwaysUpdate: 1 --- !u!114 &1554536748 @@ -27016,7 +27013,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1554536745} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 69.3, y: 24.7, z: 0} + m_LocalPosition: {x: 68.22, y: 24.65, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1375631336} @@ -27299,14 +27296,14 @@ RectTransform: m_GameObject: {fileID: 1605026743} 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_LocalScale: {x: 0.22398925, y: 0.22398925, z: 0.22398925} m_Children: [] - m_Father: {fileID: 1107270362} - m_RootOrder: 19 + m_Father: {fileID: 1350018459} + m_RootOrder: 11 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 393.4281, y: 454.17896} + m_AnchoredPosition: {x: -148.64635, y: -94.12776} m_SizeDelta: {x: 51.541992, y: 51.541992} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1605026745 @@ -27374,14 +27371,14 @@ RectTransform: m_GameObject: {fileID: 1625269335} 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_LocalScale: {x: 0.22398925, y: 0.22398925, z: 0.22398925} m_Children: [] - m_Father: {fileID: 1107270362} - m_RootOrder: 11 + m_Father: {fileID: 1350018459} + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 518.68054, y: 574.7948} + m_AnchoredPosition: {x: -120.5911, y: -67.111084} m_SizeDelta: {x: 51.541992, y: 51.541992} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1625269337 @@ -27544,7 +27541,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f037a06d9083052489faa3a9c37bb063, type: 3} m_Name: m_EditorClassIdentifier: - red: {fileID: 21300000, guid: 5a6911bfdef56e3438469bcb744038a5, type: 3} green: {fileID: 21300000, guid: f2a243993330e8e40857102cf3351e52, type: 3} --- !u!1 &1680494560 GameObject: @@ -29306,14 +29302,14 @@ RectTransform: m_GameObject: {fileID: 1864406218} 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_LocalScale: {x: 0.22398925, y: 0.22398925, z: 0.22398925} m_Children: [] - m_Father: {fileID: 1107270362} - m_RootOrder: 10 + m_Father: {fileID: 1350018459} + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 456.82617, y: 574.7949} + m_AnchoredPosition: {x: -134.44583, y: -67.11104} m_SizeDelta: {x: 51.541992, y: 51.541992} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1864406220 diff --git a/2DGame/Assets/Scripts/Gegner/EnemyCollision.cs b/2DGame/Assets/Scripts/Gegner/EnemyCollision.cs index afb9d2a..d3f5324 100644 --- a/2DGame/Assets/Scripts/Gegner/EnemyCollision.cs +++ b/2DGame/Assets/Scripts/Gegner/EnemyCollision.cs @@ -39,7 +39,7 @@ public class EnemyCollision : MonoBehaviour health.DealDamage(eS.enemyDamage); Vector2 mousePos = collision.gameObject.GetComponent().position; - Vector2 enemyPos = GetComponent().position; + Vector2 enemyPos = transform.position; Vector2 knockback = mousePos - enemyPos; knockback.Normalize(); diff --git a/2DGame/Assets/Scripts/Maus/MouseController.cs b/2DGame/Assets/Scripts/Maus/MouseController.cs index 0731077..b1207ff 100644 --- a/2DGame/Assets/Scripts/Maus/MouseController.cs +++ b/2DGame/Assets/Scripts/Maus/MouseController.cs @@ -3,6 +3,7 @@ using System; using System.Collections; using System.Collections.Generic; using UnityEngine; + public class MouseController : MonoBehaviour { Rigidbody2D rb; @@ -111,10 +112,10 @@ public class MouseController : MonoBehaviour void FixedUpdate() { - //Hier wird ein Kreis unter der Maus erzeugt, der prüft, ob die Maus den Boden berührt + //Hier wird ein Kreis unter der Maus erzeugt, der prueft, ob die Maus den Boden beruehrt isGrounded = Physics2D.OverlapCircle(groundcheck.position, checkRadius, whatIsGround); - //Wenn a und d oder Pfeiltaste links und rechts gedrückt werden, ist der Wert von moveInput -1 oder 1; + //Wenn a und d oder Pfeiltaste links und rechts gedrueckt werden, ist der Wert von moveInput -1 oder 1; float acceleration = speed; diff --git a/2DGame/Assets/Sprites/enemyDust.png b/2DGame/Assets/Sprites/enemyDust.png new file mode 100644 index 0000000..b101b89 Binary files /dev/null and b/2DGame/Assets/Sprites/enemyDust.png differ diff --git a/2DGame/Assets/Sprites/enemyDust.png.meta b/2DGame/Assets/Sprites/enemyDust.png.meta new file mode 100644 index 0000000..bcfe9ca --- /dev/null +++ b/2DGame/Assets/Sprites/enemyDust.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 03f24adbe4a503442b480da2cb2e4285 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: