// *********************************************************************** // Assembly : Game // Author : Kimch // Created : 2020-09-02 // Description : // Last Modified By : // Last Modified On : // *********************************************************************** // // // *********************************************************************** using UnityEngine; namespace G { /// /// 剑气 /// public class Skill_swordwind : MonoBehaviour { private bool _moveStart; private float _delay; private Vector3 _originScale; private void Start() { _originScale = this.transform.localScale; } private void OnEnable() { for (int i = 0; i < this.transform.childCount; i++) { this.transform.GetChild(i).gameObject.SetActive(true); } } private void FixedUpdate() { if (!_moveStart) { _moveStart = true; _delay = 0f; } _delay += Time.deltaTime; if (_delay < 2f) { //transform.position += transform.forward * Time.deltaTime; return; } this.transform.position = Vector3.one * 22f; this.transform.localScale = _originScale; this.gameObject.SetActive(false); _moveStart = false; } } }