diff --git a/Assets/Scripts/Trap.cs b/Assets/Scripts/Trap.cs index 600cb39..fde2f4c 100644 --- a/Assets/Scripts/Trap.cs +++ b/Assets/Scripts/Trap.cs @@ -108,24 +108,22 @@ public class Trap : MonoBehaviour { if (Physics.CheckSphere(transform.position + trapInteractionRadiusOffset, trapInteractionRadius, player)) { - playerInRange = true; - } else { playerInRange = false; } - if (Physics.CheckSphere(transform.position + trapInteractionRadiusOffset, trapInteractionRadius, player)) + if (Physics.CheckSphere(transform.position + trapInteractionRadiusOffset, trapInteractionRadius, robber)) { - playerInRange = true; + robberInRange = true; } else { - playerInRange = false; + robberInRange = false; } } @@ -151,31 +149,11 @@ public class Trap : MonoBehaviour if (robberInRange) { - isActivated = true; Debug.Log("The robber has set off the trap."); + isActivated = true; GetComponent().sharedMaterial = unsetMaterial; } } - void OnTriggerStay(Collider other) - { - if (other.tag == "Player") - { - playerInRange = true; - } - else - { - playerInRange = false; - } - - if (other.tag == "Robber" && isSet) - { - robberInRange = true; - } - else - { - robberInRange = false; - } - } } diff --git a/Assets/models/dobber.blend b/Assets/models/dobber.blend index a7dd7ef..7e9665a 100644 --- a/Assets/models/dobber.blend +++ b/Assets/models/dobber.blend @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4035f67d046dbfd6970a5a856089b9d70a961f9377cfc6c48dfb8972f39e3399 -size 1345480 +oid sha256:76a03ceb76ac55a6a7ce702493ecb7980630cd59fbb17f4ef3a3c5bbdf66dc9c +size 1350376 diff --git a/Assets/models/dobber.blend1 b/Assets/models/dobber.blend1 index 9b28d0f..8fbf1e9 100644 Binary files a/Assets/models/dobber.blend1 and b/Assets/models/dobber.blend1 differ diff --git a/Assets/models/dobber.fbx b/Assets/models/dobber.fbx index 4cb7d18..65a9d4f 100644 --- a/Assets/models/dobber.fbx +++ b/Assets/models/dobber.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7ac302ce60dcf6c00b222ba6c06041b6d6f813de098c77e626ba38d7a2538393 +oid sha256:1cb518fc145c6c4843f4bc3cc7babef9319ed99acdca040ae072d6937b86c561 size 228908 diff --git a/Packages/manifest.json b/Packages/manifest.json index 832f674..389fc82 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -1,5 +1,6 @@ { "dependencies": { + "com.unity.animation.rigging": "1.0.3", "com.unity.cinemachine": "2.6.9", "com.unity.ide.rider": "2.0.7", "com.unity.ide.visualstudio": "2.0.11", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 5388387..d3dfe7b 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -1,5 +1,24 @@ { "dependencies": { + "com.unity.animation.rigging": { + "version": "1.0.3", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.burst": "1.3.4", + "com.unity.test-framework": "1.1.14" + }, + "url": "https://packages.unity.com" + }, + "com.unity.burst": { + "version": "1.3.4", + "depth": 1, + "source": "registry", + "dependencies": { + "com.unity.mathematics": "1.2.1" + }, + "url": "https://packages.unity.com" + }, "com.unity.cinemachine": { "version": "2.6.9", "depth": 0, @@ -47,8 +66,8 @@ "url": "https://packages.unity.com" }, "com.unity.mathematics": { - "version": "1.1.0", - "depth": 1, + "version": "1.2.1", + "depth": 2, "source": "registry", "dependencies": {}, "url": "https://packages.unity.com" diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index 3643fa0..c1c35e7 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -13,7 +13,7 @@ TagManager: - Player - Water - UI - - + - Robber - - -