void checkclick() { if (clicked == 2) { anim.SetBool("IsRepaired", true); lc.LinkedTransition(); StartCoroutine(DestroyPanel()); } }
public void OnDrop(PointerEventData eventData) { //when item is dropped in slot, 'fixed' animation plays and the panel is destroyed if (soundeffect != null) { GameEventManager.Raise(new ItemSoundOnDestroy(soundeffect)); } if (eventData.pointerDrag != null) { eventData.pointerDrag.GetComponent <RectTransform>().anchoredPosition = GetComponent <RectTransform>().anchoredPosition; } Destroy(IteminSlot); anim.SetBool("IsRepaired", true); lc.LinkedTransition(); StartCoroutine(DestroyPanel()); }