|
@@ -12,6 +12,10 @@ public class SpiritSystem : MonoBehaviour
|
|
|
public Transform p2Orig;
|
|
public Transform p2Orig;
|
|
|
public Transform p1To;
|
|
public Transform p1To;
|
|
|
public Transform p2To;
|
|
public Transform p2To;
|
|
|
|
|
+ public Transform p1WordOrig;
|
|
|
|
|
+ public Transform p1WordTo;
|
|
|
|
|
+ public Transform p2WordOrig;
|
|
|
|
|
+ public Transform p2WordTo;
|
|
|
public float uiSpeed;
|
|
public float uiSpeed;
|
|
|
|
|
|
|
|
[Header("鯤소1暠깃")]
|
|
[Header("鯤소1暠깃")]
|
|
@@ -21,6 +25,7 @@ public class SpiritSystem : MonoBehaviour
|
|
|
public GameObject choose1;
|
|
public GameObject choose1;
|
|
|
private int curCard1;
|
|
private int curCard1;
|
|
|
static public bool isP1CardChange;
|
|
static public bool isP1CardChange;
|
|
|
|
|
+ public GameObject P1icon;
|
|
|
|
|
|
|
|
[Header("鯤소2暠깃")]
|
|
[Header("鯤소2暠깃")]
|
|
|
static public GameObject player2;
|
|
static public GameObject player2;
|
|
@@ -29,12 +34,15 @@ public class SpiritSystem : MonoBehaviour
|
|
|
public GameObject choose2;
|
|
public GameObject choose2;
|
|
|
private int curCard2;
|
|
private int curCard2;
|
|
|
static public bool isP2CardChange;
|
|
static public bool isP2CardChange;
|
|
|
|
|
+ public GameObject P2icon;
|
|
|
|
|
|
|
|
[Header("亶쥣暠깃")]
|
|
[Header("亶쥣暠깃")]
|
|
|
public Sprite floatHead;
|
|
public Sprite floatHead;
|
|
|
public Sprite CookHead;
|
|
public Sprite CookHead;
|
|
|
public Sprite AssassinHead;
|
|
public Sprite AssassinHead;
|
|
|
public Sprite InvisibleHead;
|
|
public Sprite InvisibleHead;
|
|
|
|
|
+ public Sprite isChoosing;
|
|
|
|
|
+ public Sprite isSelected;
|
|
|
|
|
|
|
|
//ref醵똑
|
|
//ref醵똑
|
|
|
private Vector3 re1 = Vector3.right;
|
|
private Vector3 re1 = Vector3.right;
|
|
@@ -50,6 +58,10 @@ public class SpiritSystem : MonoBehaviour
|
|
|
static public bool isSelect1 = false;
|
|
static public bool isSelect1 = false;
|
|
|
static public bool isSelect2 = false;
|
|
static public bool isSelect2 = false;
|
|
|
|
|
|
|
|
|
|
+ //角뤠써監긴�
|
|
|
|
|
+ static public bool isEndtran1 = false;
|
|
|
|
|
+ static public bool isEndtran2 = false;
|
|
|
|
|
+
|
|
|
private void Start()
|
|
private void Start()
|
|
|
{
|
|
{
|
|
|
p1.position = p1Orig.position;
|
|
p1.position = p1Orig.position;
|
|
@@ -96,8 +108,29 @@ public class SpiritSystem : MonoBehaviour
|
|
|
switch (id)
|
|
switch (id)
|
|
|
{
|
|
{
|
|
|
case 0:
|
|
case 0:
|
|
|
|
|
+ P1icon.transform.localPosition = p1WordTo.localPosition;
|
|
|
|
|
+ choose1.GetComponent<Image>().sprite = isSelected;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 1:
|
|
|
|
|
+ P2icon.transform.localPosition = p2WordTo.localPosition;
|
|
|
|
|
+ choose2.GetComponent<Image>().sprite = isSelected;
|
|
|
|
|
+ break;
|
|
|
|
|
+ default:
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private void EndTransfigurate(int id)
|
|
|
|
|
+ {
|
|
|
|
|
+ switch (id)
|
|
|
|
|
+ {
|
|
|
|
|
+ case 0:
|
|
|
|
|
+ P1icon.transform.localPosition = p1WordOrig.localPosition;
|
|
|
|
|
+ choose1.GetComponent<Image>().sprite = isChoosing;
|
|
|
break;
|
|
break;
|
|
|
case 1:
|
|
case 1:
|
|
|
|
|
+ P2icon.transform.localPosition = p2WordOrig.localPosition;
|
|
|
|
|
+ choose2.GetComponent<Image>().sprite = isChoosing;
|
|
|
break;
|
|
break;
|
|
|
default:
|
|
default:
|
|
|
break;
|
|
break;
|
|
@@ -195,5 +228,16 @@ public class SpiritSystem : MonoBehaviour
|
|
|
isSelect2 = false;
|
|
isSelect2 = false;
|
|
|
SelectSpirit(1);
|
|
SelectSpirit(1);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ if (isEndtran1)
|
|
|
|
|
+ {
|
|
|
|
|
+ isEndtran1 = false;
|
|
|
|
|
+ EndTransfigurate(0);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (isEndtran2)
|
|
|
|
|
+ {
|
|
|
|
|
+ isEndtran2 = false;
|
|
|
|
|
+ EndTransfigurate(1);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|