2025-05-18 01:04:31 +08:00

56 lines
1.2 KiB
C#

// ***********************************************************************
// Assembly : Game
// Author : Kimch
// Created : 2020-09-02
// Description :
// Last Modified By :
// Last Modified On :
// ***********************************************************************
// <copyright file= "RiseAttack" company="Kimch"></copyright>
// <summary></summary>
// ***********************************************************************
using UnityEngine;
namespace G
{
public class RiseAttack : MonoBehaviour
{
public float emitfinish_time;
public float destroy_time;
public float movespeed;
private Collider _collider;
private void Awake()
{
_collider = this.GetComponent<Collider>();
}
private void OnEnable()
{
Invoke(nameof(EmitFinish), emitfinish_time);
Invoke(nameof(DestroyEmitter), destroy_time);
_collider.enabled = true;
//base.particleEmitter().emit = true;
}
public void EmitFinish()
{
//base.particleEmitter().emit = false;
_collider.enabled = false;
}
public void DestroyEmitter()
{
this.gameObject.SetActive(false);
}
private void Update()
{
transform.position += transform.up * (Time.deltaTime * movespeed);
}
}
}