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

28 lines
548 B
C#

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);
}
}