using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using BITFALL.Props; using BITKit; using BITKit.Entities; using BITKit.Sensors; using UnityEngine; namespace BITFALL.Props { public class Prop_Grenade : MonoBehaviour { [SerializeField] private float fuse; private async void Start() { try { await Task.Delay(TimeSpan.FromSeconds(fuse), destroyCancellationToken); GetComponentInChildren().Explosion(gameObject); } catch (OperationCanceledException) { return; } } } }