49 lines
1.2 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= "Ef_hit" company="Kimch"></copyright>
// <summary></summary>
// ***********************************************************************
using UnityEngine;
namespace G
{
public class Ef_hit : MonoBehaviour
{
private float _showDelay;
private Vector3 _originScale;
private Vector3 _growVector = new Vector3(-3f, 0f, 10f);
private void OnEnable()
{
this.transform.localPosition = Vector3.zero;
}
private void Start()
{
_originScale = transform.localScale;
//this.GetComponent<Renderer>().sharedMaterial.renderQueue = 4051;
}
private void Update()
{
if (_showDelay < 0.25f)
{
this.transform.localScale += _growVector * Time.deltaTime;
_showDelay += Time.deltaTime;
return;
}
_showDelay = 0f;
this.transform.position = Vector3.one * 0.2f;
this.transform.localScale = _originScale;
this.gameObject.SetActive(false);
}
}
}