|
|
@@ -294,7 +294,7 @@ public class Demonic : MoveCharacter
|
|
|
break;
|
|
|
}
|
|
|
AdjustHeight();
|
|
|
- //rb.velocity = Vector3.zero;
|
|
|
+ rb.velocity = Vector3.right * velocityAddition;
|
|
|
break;
|
|
|
case CharacterState.Run:
|
|
|
if (isAttack)
|
|
|
@@ -323,7 +323,7 @@ public class Demonic : MoveCharacter
|
|
|
if (leftDir.x > 0.3f)
|
|
|
{
|
|
|
//rb.velocity += Vector3.right * moveAcc * Time.deltaTime;
|
|
|
- rb.velocity = Vector3.right * moveSpeed;
|
|
|
+ rb.velocity = Vector3.right * (moveSpeed + velocityAddition);
|
|
|
//if (rb.velocity.x > maxMoveSpeed)
|
|
|
//{
|
|
|
// rb.velocity = new Vector3(maxMoveSpeed, rb.velocity.y, rb.velocity.z);
|
|
|
@@ -336,7 +336,7 @@ public class Demonic : MoveCharacter
|
|
|
else if (leftDir.x < -0.3f)
|
|
|
{
|
|
|
//rb.velocity -= Vector3.right * moveAcc * Time.deltaTime;
|
|
|
- rb.velocity = Vector3.left * moveSpeed;
|
|
|
+ rb.velocity = Vector3.right *( -moveSpeed + velocityAddition);
|
|
|
//if (rb.velocity.x < -maxMoveSpeed)
|
|
|
//{
|
|
|
// rb.velocity = new Vector3(-maxMoveSpeed, rb.velocity.y, rb.velocity.z);
|
|
|
@@ -485,11 +485,11 @@ public class Demonic : MoveCharacter
|
|
|
ChangeState(CharacterState.Idle);
|
|
|
break;
|
|
|
}
|
|
|
+ rb.velocity = new Vector3(velocityAddition,rb.velocity.y,rb.velocity.z);
|
|
|
break;
|
|
|
case CharacterState.Die:
|
|
|
if (dieKeepTime <= 0)
|
|
|
{
|
|
|
- print("Die:" + gameObject.name);
|
|
|
if (!isSpirit)
|
|
|
{
|
|
|
Corpse.allCorpsesNum += 1;
|
|
|
@@ -505,6 +505,7 @@ public class Demonic : MoveCharacter
|
|
|
ChangeState(CharacterState.Idle);
|
|
|
break;
|
|
|
}
|
|
|
+ rb.velocity = Vector3.right * velocityAddition;
|
|
|
break;
|
|
|
default:
|
|
|
break;
|