rise-and-swine/Assets/Scripts/Assembly-CSharp/DailyChallengeData.cs
2023-02-25 23:04:03 -05:00

46 lines
733 B
C#

using System;
using System.Collections.Generic;
using UnityEngine;
[Serializable]
public class DailyChallengeData : ScriptableObject
{
public int Count
{
get
{
return this.dailyLevels.Count;
}
}
private void OnEnable()
{
if (this.dailyLevels == null)
{
this.dailyLevels = new List<DailyLevel>();
}
}
public void AddDaily(DailyLevel daily)
{
if (this.GetDaily(daily.GetKey()) == null)
{
this.dailyLevels.Add(daily);
}
}
public DailyLevel GetDaily(string key)
{
for (int i = 0; i < this.dailyLevels.Count; i++)
{
if (this.dailyLevels[i].GetKey().Equals(key))
{
return this.dailyLevels[i];
}
}
return null;
}
[SerializeField]
private List<DailyLevel> dailyLevels;
}