shaoxiadiablo/Assets/AGame/Scripts/Game/Skill/Bullet_tornado_b1.cs

50 lines
1.1 KiB
C#
Raw 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= "Bullet_tornado_b1" company="Kimch"></copyright>
// <summary></summary>
// ***********************************************************************
using UnityEngine;
namespace G
{
/// <summary>
/// 龙卷风
/// </summary>
public class Bullet_tornado_b1 : MonoBehaviour
{
private float _timer;
private void Awake()
{
_timer = 2f;
}
private void OnEnable()
{
}
private void Start()
{
this.GetComponent<Animation>()["tornado"].speed = 0.3f;
this.transform.position += this.transform.forward * 0.1f;
}
private void Update()
{
_timer -= Time.deltaTime;
float delta = 0.5f * Time.deltaTime;
this.transform.position += this.transform.forward * delta;
if (_timer <= 0f)
{
Destroy(this.gameObject);
}
}
}
}