shaoxiadiablo/Assets/AGame/Scripts/Game/Skill/SkillGroundBreak.cs

42 lines
1.0 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= "SkillGroundBreak" company="Kimch"></copyright>
// <summary></summary>
// ***********************************************************************
using UnityEngine;
namespace G
{
/// <summary>
///
/// </summary>
public class SkillGroundBreak : MonoBehaviour
{
private void OnEnable()
{
this.GetComponent<Animation>().Play();
this.GetComponent<Collider>().enabled = true;
Invoke(nameof(ColliderDisable), 0.4f);
Invoke(nameof(GameobjectDisable), 2f);
}
private void ColliderDisable()
{
this.GetComponent<Collider>().enabled = false;
}
private void GameobjectDisable()
{
this.transform.position = Vector3.one * 30f;
this.GetComponent<Animation>().Stop();
this.gameObject.SetActive(false);
}
}
}