|
@@ -1,11 +1,11 @@
|
|
|
using cfg;
|
|
using cfg;
|
|
|
using SimpleJSON;
|
|
using SimpleJSON;
|
|
|
-using System.Collections;
|
|
|
|
|
|
|
+using Sirenix.OdinInspector;
|
|
|
using System.Collections.Generic;
|
|
using System.Collections.Generic;
|
|
|
using System.IO;
|
|
using System.IO;
|
|
|
-using UnityEngine;
|
|
|
|
|
using TMPro;
|
|
using TMPro;
|
|
|
-using Sirenix.OdinInspector;
|
|
|
|
|
|
|
+using UnityEngine;
|
|
|
|
|
+using UnityEngine.UI;
|
|
|
|
|
|
|
|
public enum SoldierType
|
|
public enum SoldierType
|
|
|
{
|
|
{
|
|
@@ -50,6 +50,9 @@ public class GameManager : MonoBehaviour
|
|
|
[FoldoutGroup("Rogue数值")] [LabelText("血量上限")] public int totalHp;
|
|
[FoldoutGroup("Rogue数值")] [LabelText("血量上限")] public int totalHp;
|
|
|
[FoldoutGroup("Rogue数值")] [LabelText("金币获得增加")] public int increasedGoldGain;
|
|
[FoldoutGroup("Rogue数值")] [LabelText("金币获得增加")] public int increasedGoldGain;
|
|
|
[FoldoutGroup("Rogue数值")] [LabelText("经验获得增加")] public int increasedEXPGain;
|
|
[FoldoutGroup("Rogue数值")] [LabelText("经验获得增加")] public int increasedEXPGain;
|
|
|
|
|
+ [FoldoutGroup("Rogue数值")] [LabelText("冲刺次数")] public int dashCharges;
|
|
|
|
|
+ [FoldoutGroup("Rogue数值")] [LabelText("蓝量")] public int totalMp;
|
|
|
|
|
+ [FoldoutGroup("Rogue数值")] [LabelText("回蓝速度")] public int mpRegen;
|
|
|
|
|
|
|
|
public LeveType leveType;
|
|
public LeveType leveType;
|
|
|
[LabelText("下一关倍率增幅")] public List<float> ratioIncrease = new List<float> { 0.4f, 1.6f, -0.8f };
|
|
[LabelText("下一关倍率增幅")] public List<float> ratioIncrease = new List<float> { 0.4f, 1.6f, -0.8f };
|
|
@@ -215,6 +218,7 @@ public class GameManager : MonoBehaviour
|
|
|
|
|
|
|
|
public void GetTreasure(Treasure treasure)
|
|
public void GetTreasure(Treasure treasure)
|
|
|
{
|
|
{
|
|
|
|
|
+ PlayerController player = PlayersInput.instance[0];
|
|
|
for (int i = 0; i < treasure.type.Count; i++)
|
|
for (int i = 0; i < treasure.type.Count; i++)
|
|
|
{
|
|
{
|
|
|
float data = treasure.data[i];
|
|
float data = treasure.data[i];
|
|
@@ -247,6 +251,31 @@ public class GameManager : MonoBehaviour
|
|
|
case "经验获得增加":
|
|
case "经验获得增加":
|
|
|
increasedEXPGain += (int)data;
|
|
increasedEXPGain += (int)data;
|
|
|
break;
|
|
break;
|
|
|
|
|
+ case "冲刺次数":
|
|
|
|
|
+ dashCharges += (int)data;
|
|
|
|
|
+ player.rushChargeTotalNums += (int)data;
|
|
|
|
|
+ player.rushChargeNums = player.rushChargeTotalNums;
|
|
|
|
|
+ for (int j = 0; i < player.rushChargeTotalNums; j++)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (player.uiRush.childCount <= i)
|
|
|
|
|
+ {
|
|
|
|
|
+ Transform rushUIchid = Instantiate(player.uiRush.GetChild(0), player.uiRush);
|
|
|
|
|
+ rushUIchid.localPosition = player.uiRush.GetChild(0).transform.localPosition + Vector3.right * 50 * i;
|
|
|
|
|
+ }
|
|
|
|
|
+ UIController.ChangeImageFill(player.uiRush.GetChild(i).GetComponent<Image>(), 1);
|
|
|
|
|
+ }
|
|
|
|
|
+ break;
|
|
|
|
|
+ case "蓝量":
|
|
|
|
|
+ totalMp += (int)data;
|
|
|
|
|
+ player.totalMp += (int)data;
|
|
|
|
|
+ player.mp = player.totalMp;
|
|
|
|
|
+ player.uiMp.Show(player.mp, player.totalMp);
|
|
|
|
|
+ break;
|
|
|
|
|
+ case "回蓝速度":
|
|
|
|
|
+ mpRegen += (int)data;
|
|
|
|
|
+ player.mpReplySpeed += (int)data;
|
|
|
|
|
+ break;
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|