|
|
@@ -619,7 +619,7 @@ public class Enemy : MoveCharacter
|
|
|
public void DropSouls()
|
|
|
{
|
|
|
int dropSoulNum = Random.Range(dropSoulMin, dropSoulMax + 1);
|
|
|
- if (dropSoulNum >= 1)
|
|
|
+ if (dropSoulNum > 1)
|
|
|
{
|
|
|
for (int i = 0; i < dropSoulNum; i++)
|
|
|
{
|
|
|
@@ -635,15 +635,19 @@ public class Enemy : MoveCharacter
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- int randomInt = Random.Range(0, 100);
|
|
|
- if (randomInt < dropProbability)
|
|
|
+ if(dropSoulNum == 0)
|
|
|
{
|
|
|
- GameObject soulObj = PoolManager.Instantiate(soulPrefab, transform.position);
|
|
|
- Vector3 dir = Vector3.up;
|
|
|
- Soul soul = soulObj.GetComponent<Soul>();
|
|
|
- soul.Burst(dir * soulStartSpeed);
|
|
|
- soul.type = type;
|
|
|
+ int randomInt = Random.Range(0, 100);
|
|
|
+ if(randomInt >= dropProbability)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
+ GameObject soulObj = PoolManager.Instantiate(soulPrefab, transform.position);
|
|
|
+ Vector3 dir = Vector3.up;
|
|
|
+ Soul soul = soulObj.GetComponent<Soul>();
|
|
|
+ soul.Burst(dir * soulStartSpeed);
|
|
|
+ soul.type = type;
|
|
|
}
|
|
|
}
|
|
|
|