59 lines
1.3 KiB
C#
59 lines
1.3 KiB
C#
// ***********************************************************************
|
|
// Assembly : Game
|
|
// Author : Kimch
|
|
// Created : 2020-09-02
|
|
// Description :
|
|
// Last Modified By :
|
|
// Last Modified On :
|
|
// ***********************************************************************
|
|
// <copyright file= "Skill_swordwind" company="Kimch"></copyright>
|
|
// <summary></summary>
|
|
// ***********************************************************************
|
|
using UnityEngine;
|
|
|
|
namespace G
|
|
{
|
|
/// <summary>
|
|
/// 剑气
|
|
/// </summary>
|
|
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;
|
|
}
|
|
}
|
|
}
|