16 lines
344 B
C#
16 lines
344 B
C#
using UnityEngine;
|
|
using DG.Tweening;
|
|
using Mirror;
|
|
|
|
public class Crack : MonoBehaviour
|
|
{
|
|
public void CloseCrack()
|
|
{
|
|
transform.DOScale(new Vector3(0, 0, 0), 0.5f).SetEase(Ease.OutCubic).OnComplete(() =>
|
|
{
|
|
NetworkServer.Destroy(gameObject);
|
|
GameManager.Ins.cracksList.Clear();
|
|
});
|
|
}
|
|
}
|