Explorar o código

实现天的技能标签,现在木的灵魂花生成的时候会先产一次魂

HY-LSZNWIN10\Administrator hai 1 mes
pai
achega
729d989b98

+ 3 - 0
ActionTowerDefense/Assets/Resources/Prefab/soul.prefab

@@ -9850,6 +9850,9 @@ MonoBehaviour:
   spiritSystem: {fileID: 0}
   invincibleTime: 0.5
   bc: {fileID: 5919614424193721880}
+  soulObj: {fileID: 1723151111081767147}
+  enlargeScale: 0.2
+  groundHeight: -3
 --- !u!54 &1723151111827507801
 Rigidbody:
   m_ObjectHideFlags: 0

+ 3 - 0
ActionTowerDefense/Assets/Resources/Prefab/soul_purple.prefab

@@ -9850,6 +9850,9 @@ MonoBehaviour:
   spiritSystem: {fileID: 0}
   invincibleTime: 0.5
   bc: {fileID: 5919614424193721880}
+  soulObj: {fileID: 1723151111081767147}
+  enlargeScale: 1
+  groundHeight: 0
 --- !u!54 &1723151111827507801
 Rigidbody:
   m_ObjectHideFlags: 0

+ 3 - 0
ActionTowerDefense/Assets/Resources/Prefab/soul_red.prefab

@@ -9850,6 +9850,9 @@ MonoBehaviour:
   spiritSystem: {fileID: 0}
   invincibleTime: 0.5
   bc: {fileID: 5919614424193721880}
+  soulObj: {fileID: 1723151111081767147}
+  enlargeScale: 1
+  groundHeight: 0
 --- !u!54 &1723151111827507801
 Rigidbody:
   m_ObjectHideFlags: 0

+ 8 - 8
ActionTowerDefense/Assets/Scripts/Characters/Demonic.cs

@@ -781,14 +781,14 @@ public class Demonic : MoveCharacter
                     isDie = true;
                     summonEndToDie = false;
                     PlayersInput.instance[playerID].OnDemonicRecycle(this);
-                    if (GameManager.instance.isSkyEnable && canFly)
-                    {
-                        int randomInt = Random.Range(0, 100);
-                        if(randomInt < GameManager.instance.skyProbability)
-                        {
-                            player.nextSummonNum++;
-                        }
-                    }
+                    //if (GameManager.instance.isSkyEnable && canFly)
+                    //{
+                    //    int randomInt = Random.Range(0, 100);
+                    //    if(randomInt < GameManager.instance.skyProbability)
+                    //    {
+                    //        player.nextSummonNum++;
+                    //    }
+                    //}
                     if (GameManager.instance.isGroundEnable && !canFly)
                     {
                         int randomInt = Random.Range(0, 100);

+ 2 - 0
ActionTowerDefense/Assets/Scripts/Characters/MoveCharacter.cs

@@ -280,6 +280,8 @@ public class MoveCharacter : Character
         //¼ÆË㻤¼×¼õÃâ
         damage = (int)(damage * (100f / (100 + armorRate)) + 0.5f);
 
+        damage = (int)(damage * (1 + attributeStatus.vulnerableRate) + 0.5f);
+
         //É˺¦Ìø×Ö
         if (showInjuryNum && damage > 0)
         {

+ 5 - 6
ActionTowerDefense/Assets/Scripts/GameManager.cs

@@ -92,7 +92,7 @@ public class GameManager : MonoBehaviour
 
     [FoldoutGroup("标签/风")] [LabelText("是否启用")] public bool isWindEnable = false;
     [FoldoutGroup("标签/风")] [LabelText("触发概率")] [PropertyRange(0, 100)] public int windProbability = 100;
-    [FoldoutGroup("标签/风")] [LabelText("对地面敌人的击飞力度")] public float forceToGround = 100f;
+    [FoldoutGroup("标签/风")] [LabelText("对地面敌人的击飞力度")] public float forceToGround = 80f;
     [FoldoutGroup("标签/风")] [LabelText("落地伤害比率")] public float landingDamageRate = 1f;
     [FoldoutGroup("标签/风")] [LabelText("对飞行敌人的水平力度")] public float forceToFly = 80f;
 
@@ -104,7 +104,10 @@ public class GameManager : MonoBehaviour
     [FoldoutGroup("标签/岩")] [LabelText("石像生命值占总生命比值")] public float stoneHpRadio = 1;
 
     [FoldoutGroup("标签/天")] [LabelText("是否启用")] public bool isSkyEnable = false;
-    [FoldoutGroup("标签/天")] [LabelText("触发概率")] [PropertyRange(0, 100)] public int skyProbability = 100;
+    [FoldoutGroup("标签/天")] [LabelText("最大比例")] public float maxScale = 2;
+    [FoldoutGroup("标签/天")] [LabelText("地面高度")] public float groundHeight = 0;
+    [FoldoutGroup("标签/天")] [LabelText("成长比例")] public float enlargeScale = 0.3f;
+
 
     [FoldoutGroup("标签/地")] [LabelText("是否启用")] public bool isGroundEnable = false;
     [FoldoutGroup("标签/地")] [LabelText("触发概率")] [PropertyRange(0, 100)] public int groundProbability = 100;
@@ -379,22 +382,18 @@ public class GameManager : MonoBehaviour
                     break;
                 case "回血":
                     regeneration += (int)data;
-                    player.regeneration += (int)data;
                     break;
                 case "吸血":
                     lifesteal += (int)data;
                     break;
                 case "护甲":
                     armor += (int)data;
-                    player.attributeStatus.resistances.armor += (int)data;
                     break;
                 case "闪避":
                     dodge += (int)data;
-                    player.attributeStatus.resistances.dodge += (int)data;
                     break;
                 case "血量上限":
                     totalHp += (int)data;
-                    player.totalHp += (int)data;
                     break;
                 case "金币获得增加":
                     increasedGoldGain += (int)data;

+ 13 - 1
ActionTowerDefense/Assets/Scripts/Soul.cs

@@ -37,6 +37,10 @@ public class Soul : MonoBehaviour
     private bool isInvincible = false;
     public float invincibleTime = 0.5f;
     public BoxCollider bc;
+    public Transform soulObj;
+    public float enlargeScale = 1;
+    public float groundHeight = 0;
+    private float scale;
 
     private void Awake()
     {
@@ -100,13 +104,21 @@ public class Soul : MonoBehaviour
         }
         else
         {
-            PlayersInput.instance[id].mp += addMp;
+            if (GameManager.instance.isSkyEnable) PlayersInput.instance[id].mp += addMp * scale;
+            else PlayersInput.instance[id].mp += addMp;
         }
         
     }
 
     private void FixedUpdate()
     {
+        if (GameManager.instance.isSkyEnable)
+        {
+            scale = (transform.position.y - GameManager.instance.groundHeight) * GameManager.instance.enlargeScale;
+            scale = Mathf.Min(scale, GameManager.instance.maxScale);
+            soulObj.localScale = new Vector3(Mathf.Max(1, scale), Mathf.Max(1, scale), Mathf.Max(1, scale));
+        }
+
         if (isShoot)
         {
             time += Time.deltaTime;

+ 1 - 0
ActionTowerDefense/Assets/Scripts/SoulFlower.cs

@@ -19,6 +19,7 @@ public class SoulFlower : MonoBehaviour
     private void OnEnable()
     {
         exitTimer = Time.time;
+        DropSouls();
     }
 
     private void Update()