WGL 1 月之前
父节点
当前提交
257dc3a31b

+ 4 - 1
ActionTowerDefense/Assets/Scripts/Characters/Enemy.cs

@@ -610,7 +610,10 @@ public class Enemy : MoveCharacter
                 ani.Play(AnimatorHash.ANIMATOR_die, 0, 0);
                 isDie = true;
                 dieKeepTime = totalDieKeepTime;
-                DropSouls();
+                if(GameManager.instance.gameType != GameType.GameEnd)
+                {
+                    DropSouls();
+                }
                 break;
             default:
                 break;

+ 3 - 0
ActionTowerDefense/Assets/Scripts/GameManager.cs

@@ -41,6 +41,7 @@ public class GameManager : MonoBehaviour
     [FoldoutGroup("金币结算")][LabelText("惩罚时间间隔")] public int deductMoneyTime;
     [FoldoutGroup("金币结算")][LabelText("每次惩罚扣除金币数量")] public int deductMoney;
     [FoldoutGroup("金币结算")][LabelText("怪物掉落金币数量")] public int enemyGoldDrop;
+    [FoldoutGroup("金币结算")][LabelText("金币掉落特效")] public GameObject dropGoldFX;
 
     [FoldoutGroup("Rogue数值")] [LabelText("伤害")] public int damage;
     [FoldoutGroup("Rogue数值")] [LabelText("暴击率")] public int criticalChance;
@@ -145,6 +146,8 @@ public class GameManager : MonoBehaviour
                     objs[i].killer = null;
                     objs[i].ChangeState(CharacterState.Die);
                     dropGold += enemyGoldDrop;
+                    GameObject fx = PoolManager.Instantiate(dropGoldFX);
+                    fx.transform.position = objs[i].transform.position;
                 }
             }
         }