From 2fc9585797067730f28b03b0727bf05f9deed091 Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Fri, 12 May 2023 10:32:11 +0800 Subject: + worldline keepers --- marching/Assets/Scripts/Items/Item_Coin.cs | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 marching/Assets/Scripts/Items/Item_Coin.cs (limited to 'marching/Assets/Scripts/Items/Item_Coin.cs') diff --git a/marching/Assets/Scripts/Items/Item_Coin.cs b/marching/Assets/Scripts/Items/Item_Coin.cs deleted file mode 100644 index 1549646..0000000 --- a/marching/Assets/Scripts/Items/Item_Coin.cs +++ /dev/null @@ -1,30 +0,0 @@ -using MH; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.Rendering.Universal; - -public class Item_Coin : ItemBase -{ - - protected override void Update() - { - base.Update(); - - UnitBase hero = UnitManager.hero; - - Vector2 pos = transform.position; - Vector2 target = hero.transform.position; - - if(Vector2.Distance(pos, target) <= 0.1f) - { - this.gameObject.SetActive(false); - Destroy(this.gameObject); - return; - } - - Vector2 cur = Vector2.Lerp(pos, target, 0.01f); - transform.position = cur.ToVector3(); - } - -} \ No newline at end of file -- cgit v1.1-26-g67d0