using asap.core; using DG.Tweening; using Game; using GameCore; using System; using TMPro; using UnityEngine; public class LurecardItem : MonoBehaviour { public SkinnedMeshRenderer skinned_meshe; public TMP_Text text_num; public Vector3 startPos; public ItemData data; public Animator ani; public Transform root; [Space(10)] [Header("FX")] public GameObject fx_card_reward_big; public GameObject fx_card_reward_normal; public GameObject fx_chooceone_prepared; [NonSerialized] public int index; public void Fly(float flyTime) { transform.DOMove(startPos, flyTime).OnComplete(()=> { if (fx_chooceone_prepared) { fx_chooceone_prepared.SetActive(true); } }); PlayFly(); //if (fx_card_fly) //{ // fx_card_fly.SetActive(true); //} GContext.Publish(new EventFishingSound("audio_supplydrop_minigame_choose_cardfly")); transform.DORotate(Vector3.zero, flyTime); } void PlayFly() { ani.SetTrigger("Fly"); } public void SetNum(string num) { text_num.text = num; } public void Checked() { ani.SetTrigger("Checked"); } public void CheckOver() { ani.SetTrigger("CheckOver"); } public void Deserted() { ani.SetTrigger("Deserted"); } }