|
|
@@ -51,7 +51,8 @@ public class Enemy : MoveCharacter
|
|
|
public float attackRatio;
|
|
|
|
|
|
[Header("µôÂä»ê")]
|
|
|
- public int dropSoul = 1;
|
|
|
+ public int dropSoulMax = 1;
|
|
|
+ public int dropSoulMin = 1;
|
|
|
public float dropSoulAngle = 60f;
|
|
|
|
|
|
[Header("³å´Ì¹¥»÷")]
|
|
|
@@ -834,12 +835,13 @@ public class Enemy : MoveCharacter
|
|
|
|
|
|
public void DropSouls()
|
|
|
{
|
|
|
- if (dropSoul > 1)
|
|
|
+ int dropSoulNum = Random.Range(dropSoulMin, dropSoulMax+1);
|
|
|
+ if (dropSoulNum > 1)
|
|
|
{
|
|
|
- for (int i = 0; i < dropSoul; i++)
|
|
|
+ for (int i = 0; i < dropSoulNum; i++)
|
|
|
{
|
|
|
- float angleInterval = dropSoulAngle / (float)(dropSoul - 1);
|
|
|
- float angle = 90 + ((float)i - (float)(dropSoul - 1) / 2) * angleInterval;
|
|
|
+ float angleInterval = dropSoulAngle / (float)(dropSoulNum - 1);
|
|
|
+ float angle = 90 + ((float)i - (float)(dropSoulNum - 1) / 2) * angleInterval;
|
|
|
angle = angle / 180 * Mathf.PI;
|
|
|
GameObject soulObj = PoolManager.Instantiate(soulPrefab, transform.position);
|
|
|
Vector3 dir = new Vector3(Mathf.Cos(angle), Mathf.Sin(angle), 0);
|