From f98c32d5588cf5e04f7a667327a73b66e9757e3e Mon Sep 17 00:00:00 2001 From: finnchen123 Date: Sun, 8 Feb 2026 20:31:04 +0100 Subject: [PATCH] Slimes can now cross tile boundaries. --- Assets/Scripts/InteractableObjects/Enemy.cs | 12 ++++++++---- Assets/Scripts/Tile.cs | 2 +- CHANGELOG.txt | 2 +- UserSettings/Layouts/default-6000.dwlt | 18 +++++++++--------- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/Assets/Scripts/InteractableObjects/Enemy.cs b/Assets/Scripts/InteractableObjects/Enemy.cs index 81f6b9c..fa09ad1 100644 --- a/Assets/Scripts/InteractableObjects/Enemy.cs +++ b/Assets/Scripts/InteractableObjects/Enemy.cs @@ -68,15 +68,19 @@ namespace Assets.Scripts.InteractableObjects { if (col.name.Contains("_") && col.gameObject == gameObject.transform.parent.gameObject) { - gameObject.GetComponent().AddForce(gameObject.GetComponent().linearVelocity * -2, ForceMode.Impulse); + col.gameObject.GetComponent().aliveEnemies.Remove(gameObject); } } - public void HandleAttack() + void OnTriggerEnter(Collider col) { - //TODO: Force Fight start + if (col.name.Contains("_") && col.gameObject != gameObject.transform.parent.gameObject) + { + col.gameObject.GetComponent().aliveEnemies.Add(gameObject); + gameObject.transform.SetParent(col.gameObject.transform); + } } - + public void handleFollow(bool isFollowing) { followsPlayer = isFollowing; diff --git a/Assets/Scripts/Tile.cs b/Assets/Scripts/Tile.cs index a4478f2..d74a180 100644 --- a/Assets/Scripts/Tile.cs +++ b/Assets/Scripts/Tile.cs @@ -13,7 +13,7 @@ public class Tile : MonoBehaviour System.Random rand = new System.Random(); TileType tiletype; GameObject contentGenerator; - List aliveEnemies = new List(); + public List aliveEnemies = new List(); public void generateTile(Vector3 pos, TileType type) { diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 275e0fa..a40d221 100755 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -106,7 +106,7 @@ v2.0.0 - Gameplay and UI improvements (last update) - Improved enemy generation - Worked on controls and camera (Still a bit unpolished but close to finished) -v2.1.0 - Gameplay and UI improvements (current version) +v2.1.0 - Fixing some flaws (current version) -----Visuals/Sounds----- - Added background to coordinates // @Lunchen - Increased font size on some elements // @Lunchen diff --git a/UserSettings/Layouts/default-6000.dwlt b/UserSettings/Layouts/default-6000.dwlt index 7e7b7d4..95bfb9f 100644 --- a/UserSettings/Layouts/default-6000.dwlt +++ b/UserSettings/Layouts/default-6000.dwlt @@ -118,7 +118,7 @@ MonoBehaviour: m_MinSize: {x: 300, y: 100} m_MaxSize: {x: 24288, y: 16192} vertical: 1 - controlID: 65 + controlID: 104 draggingID: 0 --- !u!114 &6 MonoBehaviour: @@ -144,7 +144,7 @@ MonoBehaviour: m_MinSize: {x: 300, y: 100} m_MaxSize: {x: 24288, y: 16192} vertical: 0 - controlID: 66 + controlID: 105 draggingID: 0 --- !u!114 &7 MonoBehaviour: @@ -170,7 +170,7 @@ MonoBehaviour: m_MinSize: {x: 200, y: 100} m_MaxSize: {x: 16192, y: 16192} vertical: 1 - controlID: 67 + controlID: 20 draggingID: 0 --- !u!114 &8 MonoBehaviour: @@ -196,7 +196,7 @@ MonoBehaviour: m_MinSize: {x: 200, y: 50} m_MaxSize: {x: 16192, y: 8096} vertical: 0 - controlID: 42 + controlID: 21 draggingID: 0 --- !u!114 &9 MonoBehaviour: @@ -984,7 +984,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: a68bffff12fbffff + m_ExpandedIDs: 9268ffff m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -1176,9 +1176,9 @@ MonoBehaviour: m_IsLocked: 0 m_FolderTreeState: scrollPos: {x: 0, y: 116} - m_SelectedIDs: 6eb70000 - m_LastClickedID: 46958 - m_ExpandedIDs: 00000000b0bb0000b2bb0000b4bb0000b6bb0000b8bb0000babb0000 + m_SelectedIDs: 14bc0000 + m_LastClickedID: 48148 + m_ExpandedIDs: 000000007c9a00007e9a0000809a0000829a0000849a0000869a0000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -1207,7 +1207,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 00000000b0bb0000b2bb0000b4bb0000b6bb0000b8bb0000babb0000 + m_ExpandedIDs: 000000007c9a00007e9a0000809a0000829a0000849a0000869a0000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: