chicken_dy/Assets/Scripts/UI/CustomControl/LevelList/LevelList.cs

28 lines
548 B
C#
Raw Normal View History

2022-02-10 09:21:59 +00:00
using System.Collections;
using System;
using System.Collections.Generic;
using UnityEngine;
public class LevelList : UIListView<LevelCell>
{
public Action<int> DelClickLevel;
public override int Count
{
get
{
return PlayerData.Instance.UnlockedLevel;
}
}
protected override void ConfigCell(LevelCell pCell)
{
pCell.Init();
pCell.DelClick = OnClickLevel;
}
private void OnClickLevel(int pLevelIndex)
{
DelClickLevel?.Invoke(pLevelIndex);
}
}