You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
100 lines
3.2 KiB
100 lines
3.2 KiB
using DG.Tweening;
|
|
using IVDataFormat;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class EScrLife : EScrCell
|
|
{
|
|
//[SerializeField]
|
|
//private GameObject frame;
|
|
//[SerializeField]
|
|
//private Image[] lifePiecesIn;
|
|
//private Image[] lifePiecesOut;
|
|
//private Image lifeImage;
|
|
//private Button btnlife;
|
|
//private TextMeshProUGUI lifeName;
|
|
//private float tick;
|
|
|
|
//public override void InitCell()
|
|
//{
|
|
// frame = transform.Find("frame").gameObject;
|
|
// btnlife = transform.Find("btnLife").GetComponent<Button>();
|
|
// lifeName = transform.Find("lifeName").GetComponent<TextMeshProUGUI>();
|
|
// lifePiecesOut = new Image[lifePiecesIn.Length];
|
|
// for (int i = 0; i < lifePiecesIn.Length; i++)
|
|
// {
|
|
// lifePiecesOut[i] = lifePiecesIn[i].transform.GetChild(0).GetComponent<Image>();
|
|
// }
|
|
//}
|
|
//public override void SetData(int itemid)
|
|
//{
|
|
// itemID = itemid;
|
|
// btnlife.interactable = DataHandler.nextLifePieceIslock(iType, itemid);
|
|
// lifeName.text = DataHandler.GetLife(iType, itemid).txt;
|
|
// RefreshUI(itemID);
|
|
//}
|
|
//public override void RefreshCellView()
|
|
//{
|
|
// base.RefreshCellView();
|
|
// SetType(iType);
|
|
// SetData(itemID);
|
|
//}
|
|
//private void RefreshUI(int itemid)
|
|
//{
|
|
// dLife data = DataHandler.GetLife(iType, itemid);
|
|
// for (int i = 0; i < DataHandler.Const.LifePieceMaxsize; i++)
|
|
// {
|
|
// if (i < data.lifePieceCount)
|
|
// lifePiecesIn[i].gameObject.SetActive(false);
|
|
// else
|
|
// lifePiecesIn[i].gameObject.SetActive(true);
|
|
// }
|
|
// initPiece();
|
|
// shineEffect(DataHandler.GetLifePieceIslockCount(iType, itemid));
|
|
//}
|
|
|
|
//private void initPiece()
|
|
//{
|
|
// for(int i = DataHandler.GetLife(iType, itemID).lifePieceCount; i< DataHandler.Const.LifePieceMaxsize; i++)
|
|
// {
|
|
// lifePiecesOut[i].color = Global.CLR_White;
|
|
// }
|
|
//}
|
|
|
|
//public void shineEffect(int num)
|
|
//{
|
|
// for (int i = 0; i < DataHandler.Const.LifeMaxsize; i++)
|
|
// {
|
|
// if (i < num && lifePiecesIn[i].IsActive())
|
|
// {
|
|
// lifePiecesOut[i].DOFade(0.7f, 1.0f).SetEase(Ease.Linear).SetLoops(-1, LoopType.Yoyo).Restart();
|
|
// }
|
|
// else
|
|
// lifePiecesOut[i].DOKill();
|
|
// }
|
|
//}
|
|
//public IEnumerator buttonEffect(int num)
|
|
//{
|
|
// lifePiecesOut[num].color = Global.CLR_White;
|
|
// yield return null;
|
|
// lifePiecesOut[num].DOKill();
|
|
// lifePiecesOut[num].DOFade(0f, 1.0f).SetEase(Ease.Linear);
|
|
// lifePiecesIn[num].DOFade(0f, 1.0f).SetEase(Ease.Linear);
|
|
// yield return new WaitForSeconds(1.0f);
|
|
// lifePiecesIn[num].gameObject.SetActive(false);
|
|
//}
|
|
|
|
//public void OnBtnSelect()
|
|
//{
|
|
// if (DataHandler.nextLifePieceIslock(iType, itemID))
|
|
// {
|
|
// DiaryMgr.SunlockLife(iType, itemID);
|
|
// StartCoroutine(buttonEffect(DataHandler.GetLife(iType, itemID).lifePieceCount - 1));
|
|
// }
|
|
|
|
// //RefreshCellView();
|
|
//}
|
|
}
|