52 lines
1.1 KiB
C#
Raw Permalink Normal View History

2025-05-18 01:04:31 +08:00
// ***********************************************************************
// Assembly : Game
// Author : Kimch
// Created : 2020-09-02
// Description :
// Last Modified By :
// Last Modified On :
// ***********************************************************************
// <copyright file= "Swordwind_draw" company="Kimch"></copyright>
// <summary></summary>
// ***********************************************************************
using UnityEngine;
namespace G
{
public class Skill_swordwind_b : MonoBehaviour
{
public float startdelay;
private bool _show;
private float _currentDelay;
private void OnEnable()
{
_show = false;
_currentDelay = 0f;
GetComponent<Rigidbody>().mass = GetComponentInParent<Rigidbody>().mass;
}
private void Update()
{
if (!_show)
{
_show = true;
_currentDelay = 0f;
}
_currentDelay += Time.deltaTime;
if (_currentDelay < 2f)
{
transform.position += transform.forward * Time.deltaTime;
return;
}
this.transform.position = Vector3.zero;
this.gameObject.SetActive(false);
_show = false;
}
}
}