55 lines
1.0 KiB
C#
55 lines
1.0 KiB
C#
![]() |
// ***********************************************************************
|
|||
|
// Assembly : Game
|
|||
|
// Author : Kimch
|
|||
|
// Created : 2020-12-18
|
|||
|
// Description :
|
|||
|
// Last Modified By :
|
|||
|
// Last Modified On :
|
|||
|
// ***********************************************************************
|
|||
|
// <copyright file= "Ef_time" company="Kunpo"></copyright>
|
|||
|
// <summary></summary>
|
|||
|
// ***********************************************************************
|
|||
|
|
|||
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
namespace G
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
///
|
|||
|
/// </summary>
|
|||
|
public class Ef_time : MonoBehaviour
|
|||
|
{
|
|||
|
#region Field
|
|||
|
|
|||
|
public float duration = 0.5f;
|
|||
|
|
|||
|
private float _time;
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Method
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Unity
|
|||
|
|
|||
|
// Use this for initialization
|
|||
|
private void OnEnable()
|
|||
|
{
|
|||
|
_time = duration;
|
|||
|
}
|
|||
|
|
|||
|
// Update is called once per frame
|
|||
|
private void FixedUpdate()
|
|||
|
{
|
|||
|
_time -= Time.deltaTime;
|
|||
|
if (_time <= 0f)
|
|||
|
this.gameObject.SetActive(false);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|
|||
|
}
|