|
|
@@ -46,11 +46,30 @@ public class GameManager : MonoBehaviour
|
|
|
[FoldoutGroup("金币结算")][LabelText("金币掉落字体")] public GameObject dropGoldText;
|
|
|
|
|
|
[Header("商店刷新")]
|
|
|
+ [ValidateInput("CheckTagWeight","标签池子概率总和不是100%")]
|
|
|
+ [FoldoutGroup("Rogue")] [LabelText("标签池子比重(%)")] [Tooltip("最高标签池;标签池;公共池")] public List<float> tagWeight;
|
|
|
+ public bool CheckTagWeight(List<float> weights)
|
|
|
+ {
|
|
|
+ float num = 0;
|
|
|
+ for(int i = 0; i < 3; i++)
|
|
|
+ {
|
|
|
+ num += weights[i];
|
|
|
+ }
|
|
|
+ if(num == 100)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
[FoldoutGroup("Rogue")] [LabelText("第几关开始出现(%)")] public List<int> unlockLevel;
|
|
|
[FoldoutGroup("Rogue")] [LabelText("基础几率(%)")] public List<float> baseChance;
|
|
|
[FoldoutGroup("Rogue")] [LabelText("每关增加的几率(%)")] public List<float> chanceIncreasePerLevel;
|
|
|
[FoldoutGroup("Rogue")] [LabelText("最大几率(%)")] public List<float> maximumChance ;
|
|
|
- [FoldoutGroup("Rogue")] public List<List<SingleTreasureConfig>> treasuresList;
|
|
|
+ [FoldoutGroup("Rogue")] public List<List<List<SingleTreasureConfig>>> treasuresList;
|
|
|
[FoldoutGroup("Rogue")] [DisplayOnly] public List<float> trueRefreshChance;
|
|
|
[FoldoutGroup("Rogue")] [HideInInspector] public List<float> refreshChance;
|
|
|
[Header("数值加成")]
|
|
|
@@ -73,6 +92,7 @@ public class GameManager : MonoBehaviour
|
|
|
public int money;
|
|
|
public List<Treasure> myTreasures;
|
|
|
public List<int> myTreasuresTag;
|
|
|
+ public int maxTreasuresTag;
|
|
|
public float gameTime;
|
|
|
public float totalGameTime;
|
|
|
public Tables allCfgData;
|
|
|
@@ -122,12 +142,16 @@ public class GameManager : MonoBehaviour
|
|
|
}
|
|
|
leveType = LeveType.Introduction;
|
|
|
myTreasures = new List<Treasure>();
|
|
|
- treasuresList = new List<List<SingleTreasureConfig>>();
|
|
|
+ treasuresList = new List<List<List<SingleTreasureConfig>>>();
|
|
|
refreshChance = new List<float>();
|
|
|
for (int i = 0; i < 4; i++)
|
|
|
{
|
|
|
- treasuresList.Add(new List<SingleTreasureConfig>());
|
|
|
+ treasuresList.Add(new List<List<SingleTreasureConfig>>());
|
|
|
refreshChance.Add(baseChance[i]);
|
|
|
+ for(int j = 0; j < 9; j++)
|
|
|
+ {
|
|
|
+ treasuresList[i].Add(new List<SingleTreasureConfig>());
|
|
|
+ }
|
|
|
}
|
|
|
trueRefreshChance = new List<float>();
|
|
|
for (int i = 0; i < 3; i++)
|
|
|
@@ -139,7 +163,11 @@ public class GameManager : MonoBehaviour
|
|
|
for(int i = 0;i< cfgTreasureList.Count; i++)
|
|
|
{
|
|
|
SingleTreasureConfig singleTreasureConfig = cfgTreasureList[i];
|
|
|
- treasuresList[singleTreasureConfig.Quality].Add(singleTreasureConfig);
|
|
|
+ treasuresList[singleTreasureConfig.Quality][0].Add(singleTreasureConfig);
|
|
|
+ for(int j = 0; j < singleTreasureConfig.Tag.Count;j++)
|
|
|
+ {
|
|
|
+ treasuresList[singleTreasureConfig.Quality][singleTreasureConfig.Tag[j]].Add(singleTreasureConfig);
|
|
|
+ }
|
|
|
}
|
|
|
nowLevel = 1;
|
|
|
}
|