| | |
| | | |
| | | if (agent != null) |
| | | { |
| | | if (EndlessLevelManager.instance.DropRate > 0) |
| | | { |
| | | //查询 |
| | | float rate = Random.Range(0, 100) * 0.01f; |
| | | //Debug.Log($"需要处理掉落特效 rate:{rate} EndlessLevelManager.instance.DropRate:{EndlessLevelManager.instance.DropRate}"); |
| | | if (rate <= EndlessLevelManager.instance.DropRate) |
| | | { |
| | | PlayDropCoinPS(agent.position); |
| | | } |
| | | } |
| | | // if (EndlessLevelManager.instance.DropRate > 0) |
| | | // { |
| | | // //查询 |
| | | // float rate = Random.Range(0, 100) * 0.01f; |
| | | // //Debug.Log($"需要处理掉落特效 rate:{rate} EndlessLevelManager.instance.DropRate:{EndlessLevelManager.instance.DropRate}"); |
| | | // if (rate <= EndlessLevelManager.instance.DropRate) |
| | | // { |
| | | // PlayDropCoinPS(agent.position); |
| | | // } |
| | | // } |
| | | |
| | | EndlessLevelManager.instance.Currency.AddCurrency(lootDropped); |
| | | PlayDropGold(lootDropped, agent.position); |