using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class LevelPage : PageView { public Action DelClickLevel; public override int Count { get { int tCount = GameConfig.Instance.LevelSort.Count + 1; return tCount; } } protected override void ConfigCell(GameObject pCellGob, int pIndex) { LevelCell tCell = pCellGob.GetComponent(); if (pIndex < PlayerData.Instance.UnlockedLevel) { tCell.Init(pIndex); tCell.DelClick = OnClickLevel; } else { if (pIndex < Count - 1) { tCell.SetEmpty(); } else { tCell.SetComingSoon(); } } } private void OnClickLevel(int pLevelIndex) { DelClickLevel?.Invoke(pLevelIndex); } }