42 lines
1.0 KiB
C#
42 lines
1.0 KiB
C#
// ***********************************************************************
|
|
// 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);
|
|
}
|
|
}
|
|
}
|