39 lines
976 B
C#
39 lines
976 B
C#
![]() |
// ***********************************************************************
|
|||
|
// Assembly : Game
|
|||
|
// Author : Kimch
|
|||
|
// Created : 2020-09-02
|
|||
|
// Description :
|
|||
|
// Last Modified By :
|
|||
|
// Last Modified On :
|
|||
|
// ***********************************************************************
|
|||
|
// <copyright file= "Ef_swtrail" company="Kimch"></copyright>
|
|||
|
// <summary></summary>
|
|||
|
// ***********************************************************************
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
namespace G
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// 缩小
|
|||
|
/// </summary>
|
|||
|
public class Ef_swtrail : MonoBehaviour
|
|||
|
{
|
|||
|
public void OnEnable()
|
|||
|
{
|
|||
|
transform.localScale = Vector3.one * 3f;
|
|||
|
}
|
|||
|
|
|||
|
private void Update()
|
|||
|
{
|
|||
|
Vector3 localScale = this.transform.localScale;
|
|||
|
localScale -= Vector3.one * (10f * Time.deltaTime);
|
|||
|
this.transform.localScale = localScale;
|
|||
|
if (localScale.x < 0.1f)
|
|||
|
{
|
|||
|
this.transform.localScale = Vector3.zero;
|
|||
|
this.gameObject.SetActive(false);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|