|
@@ -252,7 +252,7 @@ public class Demonic : MoveCharacter
|
|
|
|
|
|
|
|
public void AdjustHeight()
|
|
public void AdjustHeight()
|
|
|
{
|
|
{
|
|
|
- if (canFly && !isBeDropped)
|
|
|
|
|
|
|
+ if (canFly)
|
|
|
{
|
|
{
|
|
|
if (transform.position.y - flyHeight > 0.1f)
|
|
if (transform.position.y - flyHeight > 0.1f)
|
|
|
{
|
|
{
|
|
@@ -435,10 +435,7 @@ public class Demonic : MoveCharacter
|
|
|
case CharacterState.Fall:
|
|
case CharacterState.Fall:
|
|
|
if (foot.TrigGround || canFly)
|
|
if (foot.TrigGround || canFly)
|
|
|
{
|
|
{
|
|
|
- if (!isBeDropped)
|
|
|
|
|
- {
|
|
|
|
|
- ChangeState(CharacterState.Idle);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ ChangeState(CharacterState.Idle);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
//if (foot.canStepPlayers.Count > 0)
|
|
//if (foot.canStepPlayers.Count > 0)
|
|
@@ -484,13 +481,10 @@ public class Demonic : MoveCharacter
|
|
|
// rb.velocity = vel;
|
|
// rb.velocity = vel;
|
|
|
// break;
|
|
// break;
|
|
|
case CharacterState.Coma:
|
|
case CharacterState.Coma:
|
|
|
- if (!isCaughtByCook)
|
|
|
|
|
|
|
+ pastComaTime += Time.deltaTime;
|
|
|
|
|
+ if (pastComaTime >= comaTime)
|
|
|
{
|
|
{
|
|
|
- pastComaTime += Time.deltaTime;
|
|
|
|
|
- if (pastComaTime >= comaTime)
|
|
|
|
|
- {
|
|
|
|
|
- ChangeState(CharacterState.Idle);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ ChangeState(CharacterState.Idle);
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
|
case CharacterState.Attack:
|
|
case CharacterState.Attack:
|
|
@@ -651,13 +645,6 @@ public class Demonic : MoveCharacter
|
|
|
//ani.Play("Coma", 0, 0);
|
|
//ani.Play("Coma", 0, 0);
|
|
|
ani.Play("idle", 0, 0);
|
|
ani.Play("idle", 0, 0);
|
|
|
aniCollider.Play("Idle", 0, 0);
|
|
aniCollider.Play("Idle", 0, 0);
|
|
|
- if (isCaughtByCook)
|
|
|
|
|
- {
|
|
|
|
|
- foreach (GameObject i in HitCols)
|
|
|
|
|
- {
|
|
|
|
|
- i.SetActive(false);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
pastComaTime = 0;
|
|
pastComaTime = 0;
|
|
|
rb.velocity = Vector3.zero;
|
|
rb.velocity = Vector3.zero;
|
|
|
break;
|
|
break;
|