|
@@ -168,65 +168,45 @@ public class SpiritSystem : MonoBehaviour
|
|
|
switch (id)
|
|
switch (id)
|
|
|
{
|
|
{
|
|
|
case 0:
|
|
case 0:
|
|
|
- if (p1Spirits.hasSpirits > 0)
|
|
|
|
|
|
|
+ if (chooseLeft)
|
|
|
{
|
|
{
|
|
|
- while (true)
|
|
|
|
|
|
|
+ curCard1 -= 1;
|
|
|
|
|
+ if (curCard1 == -1)
|
|
|
{
|
|
{
|
|
|
- if (chooseLeft)
|
|
|
|
|
- {
|
|
|
|
|
- curCard1 -= 1;
|
|
|
|
|
- if (curCard1 == -1)
|
|
|
|
|
- {
|
|
|
|
|
- curCard1 = 2;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- curCard1 += 1;
|
|
|
|
|
- if (curCard1 == 3)
|
|
|
|
|
- {
|
|
|
|
|
- curCard1 = 0;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- if(p1Spirits.ultimateTimes[curCard1] > 0)
|
|
|
|
|
- {
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ curCard1 = 2;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- choose1.transform.position = player1cards[curCard1].transform.position;
|
|
|
|
|
- p1Spirits.nowSpirit = curCard1;
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ curCard1 += 1;
|
|
|
|
|
+ if (curCard1 == 3)
|
|
|
|
|
+ {
|
|
|
|
|
+ curCard1 = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ choose1.transform.position = player1cards[curCard1].transform.position;
|
|
|
|
|
+ p1Spirits.nowSpirit = curCard1;
|
|
|
break;
|
|
break;
|
|
|
case 1:
|
|
case 1:
|
|
|
- if (p2Spirits.hasSpirits > 0)
|
|
|
|
|
|
|
+ if (chooseLeft)
|
|
|
{
|
|
{
|
|
|
- while (true)
|
|
|
|
|
|
|
+ curCard2 -= 1;
|
|
|
|
|
+ if (curCard2 == -1)
|
|
|
{
|
|
{
|
|
|
- if (chooseLeft)
|
|
|
|
|
- {
|
|
|
|
|
- curCard2 -= 1;
|
|
|
|
|
- if (curCard2 == -1)
|
|
|
|
|
- {
|
|
|
|
|
- curCard2 = 2;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- curCard2 += 1;
|
|
|
|
|
- if (curCard2 == 3)
|
|
|
|
|
- {
|
|
|
|
|
- curCard2 = 0;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- if (p2Spirits.ultimateTimes[curCard2] > 0)
|
|
|
|
|
- {
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ curCard2 = 2;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ curCard2 += 1;
|
|
|
|
|
+ if (curCard2 == 3)
|
|
|
|
|
+ {
|
|
|
|
|
+ curCard2 = 0;
|
|
|
}
|
|
}
|
|
|
- choose2.transform.position = player2cards[curCard2].transform.position;
|
|
|
|
|
- p2Spirits.nowSpirit = curCard2;
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ choose2.transform.position = player2cards[curCard2].transform.position;
|
|
|
|
|
+ p2Spirits.nowSpirit = curCard2;
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -411,14 +391,6 @@ public class SpiritSystem : MonoBehaviour
|
|
|
player2cards[i].GetComponent<Image>().sprite = SpiritTypeToSprite(p2Spirits.ownSpirits[i]);
|
|
player2cards[i].GetComponent<Image>().sprite = SpiritTypeToSprite(p2Spirits.ownSpirits[i]);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if(p1Spirits.ultimateTimes[p1Spirits.nowSpirit] == 0)
|
|
|
|
|
- {
|
|
|
|
|
- if(p2Spirits != null)
|
|
|
|
|
- {
|
|
|
|
|
- ChangeSpirit(1, true);
|
|
|
|
|
- }
|
|
|
|
|
- ChangeSpirit(0, true);
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//SpiritTypeתͼƬ
|
|
//SpiritTypeתͼƬ
|