Forráskód Böngészése

场上每多一个同种类兵种,召唤兵种蓝耗+x

LAPTOP-OM1V99U2\永远de小亡灵 10 hónapja
szülő
commit
19cfd5614a
1 módosított fájl, 5 hozzáadás és 0 törlés
  1. 5 0
      ActionTowerDefense/Assets/Scripts/PlayerController.cs

+ 5 - 0
ActionTowerDefense/Assets/Scripts/PlayerController.cs

@@ -76,6 +76,7 @@ public class PlayerController : MoveCharacter
     private float addMp = 10;
     public GameObject soul;
     public GameObject rapidReplyEffect;
+    [Tooltip("场上每多一个同种类兵种,召唤兵种蓝耗+x")]public float[] addCostMp;
 
     [Header("移动属性")]
     public Vector2 moveVec;         //玩家不动时移动数据
@@ -2179,6 +2180,10 @@ public class PlayerController : MoveCharacter
         }
 
         float costMp = prefab.GetComponent<Demonic>().costMp;
+        if (id < 3)
+        {
+            costMp += addCostMp[id] * demonicDic[id].Count;
+        }
         if (mp < costMp)
         {
             Debug.Log("mp不足召唤失败, 还得加个动画或者音效啥的");