// ***********************************************************************
// Assembly : Game
// Author : Kimch
// Created : 2020-09-02
// Description :
// Last Modified By :
// Last Modified On :
// ***********************************************************************
//
//
// ***********************************************************************
using UnityEngine;
namespace G
{
///
/// 龙卷风
///
public class Bullet_tornado_b : MonoBehaviour
{
private Vector3 _originScale;
private void Awake()
{
_originScale = transform.localScale;
}
private void OnEnable()
{
this.transform.localScale = _originScale;
}
private void Start()
{
this.GetComponent()["tornado"].speed = 0.3f;
this.transform.position += this.transform.forward * 0.1f;
}
private void Update()
{
float delta = 0.5f * Time.deltaTime;
this.transform.position += this.transform.forward * delta;
this.transform.localScale += new Vector3(-5f * delta, delta, -5f * delta);
Vector3 localScale = transform.localScale;
if (localScale.y > 4f)
{
this.transform.position = Vector3.one * 5f;
this.gameObject.SetActive(false);
}
}
}
}