using System.Collections;
|
using System.Collections.Generic;
|
using UnityEngine;
|
|
namespace vnxbqy.UI
|
{
|
|
public class EquipSetStar
|
{
|
public readonly int level = 0;
|
public Redpoint redpoint;
|
Dictionary<int, int> equipStars = new Dictionary<int, int>();
|
Dictionary<int, Redpoint> equipStarPoints = new Dictionary<int, Redpoint>();
|
|
public EquipSetStar(int level)
|
{
|
this.level = level;
|
this.redpoint = new Redpoint(1720000, 1720000 + level * 100);
|
|
for (var place = 1; place <= 12; place++)
|
{
|
equipStarPoints[place] = new Redpoint(1720000 + level * 100, 1720000 + level * 100 + place);
|
}
|
}
|
|
public void ResetStarLevel()
|
{
|
for (int i = 0; i <= 12; i++)
|
{
|
equipStars[i] = 0;
|
}
|
}
|
|
public int GetTotalStarLevel()
|
{
|
var totalLevel = 0;
|
foreach (var starLevel in equipStars.Values)
|
{
|
totalLevel += starLevel;
|
}
|
|
return totalLevel;
|
}
|
|
public void UpdateEquipStarLevel(int place, int level)
|
{
|
equipStars[place] = level;
|
}
|
|
public int GetEquipStarLevel(int place)
|
{
|
return equipStars.ContainsKey(place) ? equipStars[place] : 0;
|
}
|
|
public int GetEquipCountWhichStarLevelLq(int standard)
|
{
|
var count = 0;
|
foreach (var starLevel in equipStars.Values)
|
{
|
count += starLevel >= standard ? 1 : 0;
|
}
|
|
return count;
|
}
|
|
public void UpdateRedpoint(int place, RedPointState state)
|
{
|
if (equipStarPoints.ContainsKey(place))
|
{
|
equipStarPoints[place].state = state;
|
}
|
}
|
|
public RedPointState GetRedpointState(int place)
|
{
|
if (equipStarPoints.ContainsKey(place))
|
{
|
return equipStarPoints[place].state;
|
}
|
else
|
{
|
return RedPointState.None;
|
}
|
}
|
|
}
|
|
public enum EquipSuitType
|
{
|
TwoSuit = 2,
|
FiveSuit = 5,
|
EightSuit = 8,
|
}
|
|
}
|