|
@@ -18,7 +18,7 @@ public class PlayerController : MoveCharacter
|
|
|
[Space(30)]
|
|
[Space(30)]
|
|
|
[Title("PlayerControllerÊôÐÔ")]
|
|
[Title("PlayerControllerÊôÐÔ")]
|
|
|
public int playerId;
|
|
public int playerId;
|
|
|
- public Vector2 pos;
|
|
|
|
|
|
|
+ [LabelText("Ö÷½ÇË¢ÐÂλÖÃ")] public Vector2 refreshPos;
|
|
|
public bool canJump;
|
|
public bool canJump;
|
|
|
public Animator aniCollider;
|
|
public Animator aniCollider;
|
|
|
|
|
|
|
@@ -343,7 +343,8 @@ public class PlayerController : MoveCharacter
|
|
|
spirits = GetComponent<Spirits>();
|
|
spirits = GetComponent<Spirits>();
|
|
|
conductController = GetComponent<ConductController>();
|
|
conductController = GetComponent<ConductController>();
|
|
|
playerId = playerInput.playerIndex;
|
|
playerId = playerInput.playerIndex;
|
|
|
- transform.position = new Vector3(pos.x, pos.y, 0);
|
|
|
|
|
|
|
+ Vector3 towerPos = TowerMap.myTowers[0].transform.position;
|
|
|
|
|
+ transform.position = new Vector3(towerPos.x + refreshPos.x, towerPos.y + refreshPos.y, 0);
|
|
|
switch (playerId)
|
|
switch (playerId)
|
|
|
{
|
|
{
|
|
|
case 0:
|
|
case 0:
|
|
@@ -1457,7 +1458,8 @@ public class PlayerController : MoveCharacter
|
|
|
bodyTrans.gameObject.SetActive(true);
|
|
bodyTrans.gameObject.SetActive(true);
|
|
|
uiHp.transform.parent.gameObject.SetActive(true);
|
|
uiHp.transform.parent.gameObject.SetActive(true);
|
|
|
rb.constraints = RigidbodyConstraints.FreezePositionZ | RigidbodyConstraints.FreezeRotation;
|
|
rb.constraints = RigidbodyConstraints.FreezePositionZ | RigidbodyConstraints.FreezeRotation;
|
|
|
- transform.position = new Vector3(142 + 4 * playerId, 0, 0);
|
|
|
|
|
|
|
+ Vector3 towerPos = TowerMap.myTowers[0].transform.position;
|
|
|
|
|
+ transform.position = new Vector3(towerPos.x + refreshPos.x , towerPos.y+refreshPos.y, 0);
|
|
|
switch (playerId)
|
|
switch (playerId)
|
|
|
{
|
|
{
|
|
|
case 0:
|
|
case 0:
|