// *********************************************************************** // Assembly : Game // Author : Kimch // Created : 2020-09-02 // Description : // Last Modified By : // Last Modified On : // *********************************************************************** // // // *********************************************************************** using UnityEngine; namespace G { /// /// 缩小 /// public class Ef_swtrail : MonoBehaviour { public void OnEnable() { transform.localScale = Vector3.one * 3f; } private void Update() { Vector3 localScale = this.transform.localScale; localScale -= Vector3.one * (10f * Time.deltaTime); this.transform.localScale = localScale; if (localScale.x < 0.1f) { this.transform.localScale = Vector3.zero; this.gameObject.SetActive(false); } } } }