using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Despawn : MonoBehaviour
{
    public delegate void EntityDespawnDelegate(Despawn d) ;
    public EntityDespawnDelegate EntityDespawnEvent ;

    private int _entityIndex;

    public void SetEntityIndex(int index)
    {
        _entityIndex = index;
    }
    
    public int GetEntityIndex()
    {
        return _entityIndex ;
    }

    public void InvokeDespawnEvent() {
        EntityDespawnEvent?.Invoke(this) ;     
    }
}
