|
@@ -109,15 +109,8 @@ public class PlayerController : MoveCharacter
|
|
|
|
|
|
|
|
public bool isTransfiguration = false; //已变身
|
|
public bool isTransfiguration = false; //已变身
|
|
|
|
|
|
|
|
- public bool isinputJ;
|
|
|
|
|
- public bool isinputK;
|
|
|
|
|
- public bool isinputL;
|
|
|
|
|
-
|
|
|
|
|
public Vector2 moveVec; //玩家不动时移动数据
|
|
public Vector2 moveVec; //玩家不动时移动数据
|
|
|
|
|
|
|
|
- public float relieveTranTime; //解除变身所需长按时间
|
|
|
|
|
- private bool isTryingToRelieve = false;
|
|
|
|
|
- private float pressTime;
|
|
|
|
|
|
|
|
|
|
public bool btnJumpPress
|
|
public bool btnJumpPress
|
|
|
{
|
|
{
|
|
@@ -361,16 +354,6 @@ public class PlayerController : MoveCharacter
|
|
|
if (isTransfiguration)
|
|
if (isTransfiguration)
|
|
|
{
|
|
{
|
|
|
bodyTrans.position = spiritObj.transform.position;
|
|
bodyTrans.position = spiritObj.transform.position;
|
|
|
- if (isTryingToRelieve)
|
|
|
|
|
- {
|
|
|
|
|
- pressTime += Time.deltaTime;
|
|
|
|
|
- if (pressTime >= relieveTranTime)
|
|
|
|
|
- {
|
|
|
|
|
- EndTransfiguration(endChange);
|
|
|
|
|
- isTryingToRelieve = false;
|
|
|
|
|
- pressTime = 0;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -414,17 +397,6 @@ public class PlayerController : MoveCharacter
|
|
|
if (!isFloat && canMove)
|
|
if (!isFloat && canMove)
|
|
|
{
|
|
{
|
|
|
isClickBtnWest = true;
|
|
isClickBtnWest = true;
|
|
|
- if (isTransfiguration)
|
|
|
|
|
- {
|
|
|
|
|
- isinputJ = true;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- void OnSummon0Up()
|
|
|
|
|
- {
|
|
|
|
|
- if (isTransfiguration)
|
|
|
|
|
- {
|
|
|
|
|
- isinputJ = false;
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
void OnSummon1()
|
|
void OnSummon1()
|
|
@@ -432,17 +404,6 @@ public class PlayerController : MoveCharacter
|
|
|
if (!isFloat && canMove)
|
|
if (!isFloat && canMove)
|
|
|
{
|
|
{
|
|
|
isClickBtnSouth = true;
|
|
isClickBtnSouth = true;
|
|
|
- if (isTransfiguration)
|
|
|
|
|
- {
|
|
|
|
|
- isinputK = true;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- void OnSummon1Up()
|
|
|
|
|
- {
|
|
|
|
|
- if (isTransfiguration)
|
|
|
|
|
- {
|
|
|
|
|
- isinputK = false;
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
void OnSummon2()
|
|
void OnSummon2()
|
|
@@ -450,17 +411,6 @@ public class PlayerController : MoveCharacter
|
|
|
if (!isFloat && canMove)
|
|
if (!isFloat && canMove)
|
|
|
{
|
|
{
|
|
|
isClickBtnEast = true;
|
|
isClickBtnEast = true;
|
|
|
- if (isTransfiguration)
|
|
|
|
|
- {
|
|
|
|
|
- isinputL = true;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- void OnSummon2Up()
|
|
|
|
|
- {
|
|
|
|
|
- if (isTransfiguration)
|
|
|
|
|
- {
|
|
|
|
|
- isinputL = false;
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
void OnSummonSpirit()
|
|
void OnSummonSpirit()
|
|
@@ -469,15 +419,7 @@ public class PlayerController : MoveCharacter
|
|
|
isSpiritSummon = true;
|
|
isSpiritSummon = true;
|
|
|
if (isTransfiguration && currentSpirit == 0)
|
|
if (isTransfiguration && currentSpirit == 0)
|
|
|
{
|
|
{
|
|
|
- isTryingToRelieve = true;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- void OnSummonSpiritUp()
|
|
|
|
|
- {
|
|
|
|
|
- if (isTryingToRelieve && currentSpirit == 0)
|
|
|
|
|
- {
|
|
|
|
|
- isTryingToRelieve = false;
|
|
|
|
|
- pressTime = 0;
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
void OnSummonSpirit1()
|
|
void OnSummonSpirit1()
|
|
@@ -486,15 +428,7 @@ public class PlayerController : MoveCharacter
|
|
|
isSpiritSummon1 = true;
|
|
isSpiritSummon1 = true;
|
|
|
if (isTransfiguration && currentSpirit == 1)
|
|
if (isTransfiguration && currentSpirit == 1)
|
|
|
{
|
|
{
|
|
|
- isTryingToRelieve = true;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- void OnSummonSpirit1Up()
|
|
|
|
|
- {
|
|
|
|
|
- if (isTryingToRelieve && currentSpirit == 1)
|
|
|
|
|
- {
|
|
|
|
|
- isTryingToRelieve = false;
|
|
|
|
|
- pressTime = 0;
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
void OnSummonSpirit2()
|
|
void OnSummonSpirit2()
|
|
@@ -503,15 +437,7 @@ public class PlayerController : MoveCharacter
|
|
|
isSpiritSummon2 = true;
|
|
isSpiritSummon2 = true;
|
|
|
if (isTransfiguration && currentSpirit == 2)
|
|
if (isTransfiguration && currentSpirit == 2)
|
|
|
{
|
|
{
|
|
|
- isTryingToRelieve = true;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- void OnSummonSpirit2Up()
|
|
|
|
|
- {
|
|
|
|
|
- if (isTryingToRelieve && currentSpirit == 2)
|
|
|
|
|
- {
|
|
|
|
|
- isTryingToRelieve = false;
|
|
|
|
|
- pressTime = 0;
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
void OnSummonSpirit3()
|
|
void OnSummonSpirit3()
|
|
@@ -520,15 +446,7 @@ public class PlayerController : MoveCharacter
|
|
|
isSpiritSummon3 = true;
|
|
isSpiritSummon3 = true;
|
|
|
if (isTransfiguration && currentSpirit == 3)
|
|
if (isTransfiguration && currentSpirit == 3)
|
|
|
{
|
|
{
|
|
|
- isTryingToRelieve = true;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- void OnSummonSpirit3Up()
|
|
|
|
|
- {
|
|
|
|
|
- if (isTryingToRelieve && currentSpirit == 3)
|
|
|
|
|
- {
|
|
|
|
|
- isTryingToRelieve = false;
|
|
|
|
|
- pressTime = 0;
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
public void Jump()
|
|
public void Jump()
|
|
@@ -1590,9 +1508,6 @@ public class PlayerController : MoveCharacter
|
|
|
public void EndTransfiguration(int id)
|
|
public void EndTransfiguration(int id)
|
|
|
{
|
|
{
|
|
|
isTransfiguration = false;
|
|
isTransfiguration = false;
|
|
|
- isinputJ = false;
|
|
|
|
|
- isinputK = false;
|
|
|
|
|
- isinputL = false;
|
|
|
|
|
canfly = false;
|
|
canfly = false;
|
|
|
canJump = true;
|
|
canJump = true;
|
|
|
canMove = true;
|
|
canMove = true;
|