|
|
@@ -54,19 +54,30 @@ public class Soul : MonoBehaviour
|
|
|
public async void BeCollect(int id)
|
|
|
{
|
|
|
Spirits spirits = PlayersInput.instance[id].GetComponent<Spirits>();
|
|
|
- if (isSourPurple && spirits.hasSpirits == 3)
|
|
|
+ if (isSourPurple)
|
|
|
{
|
|
|
- for(int i = 0; i < 3; i++)
|
|
|
+ if(spirits.hasSpirits == 3)
|
|
|
{
|
|
|
- if(type == spirits.ownSpirits[i])
|
|
|
- {
|
|
|
- break;
|
|
|
- }
|
|
|
- if(i == 2)
|
|
|
+ for (int i = 0; i < 3; i++)
|
|
|
{
|
|
|
- return;
|
|
|
+ if (type == spirits.ownSpirits[i])
|
|
|
+ {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ if (i == 2)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if(PlayersInput.instance[id].mp >= PlayersInput.instance[id].totalMp)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
collected = true;
|
|
|
GetComponent<BoxCollider>().enabled = false;
|