diff options
author | chai <215380520@qq.com> | 2023-05-12 10:32:11 +0800 |
---|---|---|
committer | chai <215380520@qq.com> | 2023-05-12 10:32:11 +0800 |
commit | 2fc9585797067730f28b03b0727bf05f9deed091 (patch) | |
tree | 8807e37b85ba922045eaa17ac445dd0a1d2d730c /marching/Assets/Scripts/WaypointScript.cs | |
parent | 2a1cd4fda8a4a8e649910d16b4dfa1ce7ae63543 (diff) |
+ worldline keepers
Diffstat (limited to 'marching/Assets/Scripts/WaypointScript.cs')
-rw-r--r-- | marching/Assets/Scripts/WaypointScript.cs | 35 |
1 files changed, 0 insertions, 35 deletions
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<SpriteRenderer>().color; - c.a *= 0.99f; - this.gameObject.GetComponent<SpriteRenderer>().color = c; - this.transform.localScale *= 1.002f; - t+= Time.deltaTime; - if(t > life) - { - Destroy(this.gameObject); - yield break; - } - yield return null; - } - } - - -} |