]> git.lizzy.rs Git - SuperMouseAdventure.git/blobdiff - 2DGame/Assets/Scripts/Level_Elements/KeyScript.cs
key collecting v0.2
[SuperMouseAdventure.git] / 2DGame / Assets / Scripts / Level_Elements / KeyScript.cs
diff --git a/2DGame/Assets/Scripts/Level_Elements/KeyScript.cs b/2DGame/Assets/Scripts/Level_Elements/KeyScript.cs
deleted file mode 100644 (file)
index 16a23f6..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class KeyScript : MonoBehaviour
-{
-    [SerializeField] private Transform bubblePos;
-    
-    bool collected;
-
-    private void OnTriggerEnter2D(Collider2D collision)
-    {
-        if (collision.gameObject.CompareTag("Player"))
-        {
-            collected = true;
-        }
-    }
-
-    private void Update()
-    {
-        if (collected)
-        {
-            transform.position = bubblePos.position;
-        }
-    }
-}