|
@@ -681,6 +681,17 @@ public class PlayerController : MoveCharacter
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ if (state != CharacterState.Conduct && nowConductButton != -1 && conductTime > totalCacheSummonTime)
|
|
|
|
|
+ {
|
|
|
|
|
+ CheckTurn();
|
|
|
|
|
+ if (conductCanRelease[nowConductButton])
|
|
|
|
|
+ {
|
|
|
|
|
+ ChangeState(CharacterState.Conduct);
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ return false;
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
if (isBtnEastUp || isBtnWestUp || isBtnSouthUp)
|
|
if (isBtnEastUp || isBtnWestUp || isBtnSouthUp)
|
|
|
{
|
|
{
|
|
|
if (cacheSummonTime >= 0 && conductTime <= totalCacheSummonTime)
|
|
if (cacheSummonTime >= 0 && conductTime <= totalCacheSummonTime)
|
|
@@ -694,16 +705,7 @@ public class PlayerController : MoveCharacter
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if (state != CharacterState.Conduct && nowConductButton != -1 && conductTime > totalCacheSummonTime)
|
|
|
|
|
- {
|
|
|
|
|
- CheckTurn();
|
|
|
|
|
- if (conductCanRelease[nowConductButton])
|
|
|
|
|
- {
|
|
|
|
|
- ChangeState(CharacterState.Conduct);
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- }
|
|
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -718,9 +720,10 @@ public class PlayerController : MoveCharacter
|
|
|
isReadyConduct = false;
|
|
isReadyConduct = false;
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
if (!isReadyConduct && nowConductButton != -1)
|
|
if (!isReadyConduct && nowConductButton != -1)
|
|
|
{
|
|
{
|
|
|
- if (conductTime >= totalCacheSummonTime + canConductTime[nowConductButton] * timeSlowingMultiplier)
|
|
|
|
|
|
|
+ if (conductTime >= canConductTime[nowConductButton] * timeSlowingMultiplier)
|
|
|
{
|
|
{
|
|
|
isReadyConduct = true;
|
|
isReadyConduct = true;
|
|
|
if (!conductReadyTip.isShowing1 && !conductReadyTip.isShowingNoDemonic)
|
|
if (!conductReadyTip.isShowing1 && !conductReadyTip.isShowingNoDemonic)
|
|
@@ -743,7 +746,7 @@ public class PlayerController : MoveCharacter
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
- else if (conductTime >= totalCacheSummonTime + (canConductTime[nowConductButton] - readyTipFxTime) * timeSlowingMultiplier)
|
|
|
|
|
|
|
+ else if (conductTime >= (canConductTime[nowConductButton] - readyTipFxTime) * timeSlowingMultiplier)
|
|
|
{
|
|
{
|
|
|
if (!conductReadyTip.isShowing0 && !conductReadyTip.isShowingNoDemonic)
|
|
if (!conductReadyTip.isShowing0 && !conductReadyTip.isShowingNoDemonic)
|
|
|
{
|
|
{
|
|
@@ -765,7 +768,7 @@ public class PlayerController : MoveCharacter
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
- else if (conductTime > totalCacheSummonTime)
|
|
|
|
|
|
|
+ else
|
|
|
{
|
|
{
|
|
|
if (Time.timeScale == 1)
|
|
if (Time.timeScale == 1)
|
|
|
{
|
|
{
|
|
@@ -782,14 +785,9 @@ public class PlayerController : MoveCharacter
|
|
|
CannotConductFX(nowConductButton);
|
|
CannotConductFX(nowConductButton);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
conductReadyTip.Init();
|
|
conductReadyTip.Init();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -985,14 +983,7 @@ public class PlayerController : MoveCharacter
|
|
|
{
|
|
{
|
|
|
if (!foot.TrigGround)
|
|
if (!foot.TrigGround)
|
|
|
{
|
|
{
|
|
|
- //if(excludeState != CharacterState.Summon)
|
|
|
|
|
- //{
|
|
|
|
|
- // if (CheckSummon())
|
|
|
|
|
- // {
|
|
|
|
|
- // return true;
|
|
|
|
|
- // }
|
|
|
|
|
- //}
|
|
|
|
|
- if (excludeState != CharacterState.Summon || excludeState != CharacterState.Conduct)
|
|
|
|
|
|
|
+ if (excludeState != CharacterState.Summon)
|
|
|
{
|
|
{
|
|
|
if (CheckSummon())
|
|
if (CheckSummon())
|
|
|
{
|
|
{
|
|
@@ -1036,7 +1027,7 @@ public class PlayerController : MoveCharacter
|
|
|
// return true;
|
|
// return true;
|
|
|
// }
|
|
// }
|
|
|
//}
|
|
//}
|
|
|
- if (excludeState != CharacterState.Summon || excludeState != CharacterState.Conduct)
|
|
|
|
|
|
|
+ if (excludeState != CharacterState.Summon)
|
|
|
{
|
|
{
|
|
|
if (CheckSummon())
|
|
if (CheckSummon())
|
|
|
{
|
|
{
|
|
@@ -1263,7 +1254,7 @@ public class PlayerController : MoveCharacter
|
|
|
}
|
|
}
|
|
|
if (foot.TrigGround)
|
|
if (foot.TrigGround)
|
|
|
{
|
|
{
|
|
|
- if (CheckPlayerChangeState())
|
|
|
|
|
|
|
+ if (CheckPlayerChangeState(CharacterState.Fall))
|
|
|
{
|
|
{
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
@@ -1334,7 +1325,7 @@ public class PlayerController : MoveCharacter
|
|
|
ChangeState(CharacterState.KeepAttack);
|
|
ChangeState(CharacterState.KeepAttack);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
- if (CheckPlayerChangeState())
|
|
|
|
|
|
|
+ if (CheckPlayerChangeState(CharacterState.Attack))
|
|
|
{
|
|
{
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
@@ -1353,7 +1344,7 @@ public class PlayerController : MoveCharacter
|
|
|
}
|
|
}
|
|
|
if (!btnNorthKeep)
|
|
if (!btnNorthKeep)
|
|
|
{
|
|
{
|
|
|
- if (CheckPlayerChangeState(CharacterState.Attack))
|
|
|
|
|
|
|
+ if (CheckPlayerChangeState(CharacterState.KeepAttack))
|
|
|
{
|
|
{
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
@@ -1503,9 +1494,9 @@ public class PlayerController : MoveCharacter
|
|
|
{
|
|
{
|
|
|
cacheRush = true;
|
|
cacheRush = true;
|
|
|
}
|
|
}
|
|
|
- if (summonTime <= 0 || btnTransfiguratePress)
|
|
|
|
|
|
|
+ if (summonTime <= 0)
|
|
|
{
|
|
{
|
|
|
- if (CheckPlayerChangeState())
|
|
|
|
|
|
|
+ if (CheckPlayerChangeState(CharacterState.Summon))
|
|
|
{
|
|
{
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
@@ -1521,7 +1512,7 @@ public class PlayerController : MoveCharacter
|
|
|
ChangeState(CharacterState.Sprint);
|
|
ChangeState(CharacterState.Sprint);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
- if (CheckPlayerChangeState())
|
|
|
|
|
|
|
+ if (CheckPlayerChangeState(CharacterState.Rush))
|
|
|
{
|
|
{
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
@@ -1547,14 +1538,14 @@ public class PlayerController : MoveCharacter
|
|
|
case CharacterState.Sprint:
|
|
case CharacterState.Sprint:
|
|
|
if (!btnRushKeep)
|
|
if (!btnRushKeep)
|
|
|
{
|
|
{
|
|
|
- if (CheckPlayerChangeState(CharacterState.Rush))
|
|
|
|
|
|
|
+ if (CheckPlayerChangeState(CharacterState.Sprint))
|
|
|
{
|
|
{
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (mp < sprintCostMp * Time.deltaTime)
|
|
if (mp < sprintCostMp * Time.deltaTime)
|
|
|
{
|
|
{
|
|
|
- if (CheckPlayerChangeState(CharacterState.Rush))
|
|
|
|
|
|
|
+ if (CheckPlayerChangeState(CharacterState.Sprint))
|
|
|
{
|
|
{
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
@@ -1861,13 +1852,16 @@ public class PlayerController : MoveCharacter
|
|
|
case CharacterState.Conduct:
|
|
case CharacterState.Conduct:
|
|
|
rb.isKinematic = false;
|
|
rb.isKinematic = false;
|
|
|
Time.timeScale = 1;
|
|
Time.timeScale = 1;
|
|
|
|
|
+ Debug.Log(222);
|
|
|
conductReadyTip.activeFalse();
|
|
conductReadyTip.activeFalse();
|
|
|
break;
|
|
break;
|
|
|
default:
|
|
default:
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
CharacterState oldState = state;
|
|
CharacterState oldState = state;
|
|
|
|
|
+
|
|
|
state = newState;
|
|
state = newState;
|
|
|
|
|
+
|
|
|
switch (newState)
|
|
switch (newState)
|
|
|
{
|
|
{
|
|
|
case CharacterState.Idle:
|
|
case CharacterState.Idle:
|
|
@@ -1972,6 +1966,8 @@ public class PlayerController : MoveCharacter
|
|
|
//hurtKeepTime = minHurtKeepTime;
|
|
//hurtKeepTime = minHurtKeepTime;
|
|
|
break;
|
|
break;
|
|
|
case CharacterState.Conduct:
|
|
case CharacterState.Conduct:
|
|
|
|
|
+ Debug.Log(oldState);
|
|
|
|
|
+ conductTime = 0;
|
|
|
rb.velocity = Vector3.zero;
|
|
rb.velocity = Vector3.zero;
|
|
|
rb.isKinematic = true;
|
|
rb.isKinematic = true;
|
|
|
aniCollider.Play("Summon", 0, 0);
|
|
aniCollider.Play("Summon", 0, 0);
|