public void Init(RecyclerController recyclerController) { EventTrigger.Entry entry = new EventTrigger.Entry(); entry.eventID = EventTriggerType.Drop; entry.callback.AddListener((eventData) => { recyclerController.Recycle(recyclableType); }); eventTrigger.triggers.Add(entry); }
protected override void Awake() { base.Awake(); recyclerController = FindObjectOfType <RecyclerController>(); }