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/WaypointScript.cs | 35 ------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 marching/Assets/Scripts/WaypointScript.cs (limited to 'marching/Assets/Scripts/WaypointScript.cs') diff --git a/marching/Assets/Scripts/WaypointScript.cs b/marching/Assets/Scripts/WaypointScript.cs deleted file mode 100644 index 1012bc2..0000000 --- a/marching/Assets/Scripts/WaypointScript.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class WaypointScript : MonoBehaviour -{ - public float life; - - // Start is called before the first frame update - void Start() - { - StartCoroutine(CoUpdate()); - } - - - IEnumerator CoUpdate() { - float t = 0; - while (true) - { - Color c = this.gameObject.GetComponent().color; - c.a *= 0.99f; - this.gameObject.GetComponent().color = c; - this.transform.localScale *= 1.002f; - t+= Time.deltaTime; - if(t > life) - { - Destroy(this.gameObject); - yield break; - } - yield return null; - } - } - - -} -- cgit v1.1-26-g67d0