|
@@ -119,14 +119,15 @@ public class Demonic : MoveCharacter
|
|
|
switch (searchState)
|
|
switch (searchState)
|
|
|
{
|
|
{
|
|
|
case SearchState.NoTarget:
|
|
case SearchState.NoTarget:
|
|
|
- if (PlayerController.instance.bodyTrans.localScale.x > 0)
|
|
|
|
|
- {
|
|
|
|
|
- moveDir = Vector3.left;
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- moveDir = Vector3.right;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ //if (PlayerController.instance.bodyTrans.localScale.x > 0)
|
|
|
|
|
+ //{
|
|
|
|
|
+ // moveDir = Vector3.left;
|
|
|
|
|
+ //}
|
|
|
|
|
+ //else
|
|
|
|
|
+ //{
|
|
|
|
|
+ // moveDir = Vector3.right;
|
|
|
|
|
+ //}
|
|
|
|
|
+ moveDir = Vector3.left;
|
|
|
break;
|
|
break;
|
|
|
case SearchState.InSearchScope:
|
|
case SearchState.InSearchScope:
|
|
|
if (targetCharacter)
|
|
if (targetCharacter)
|
|
@@ -417,6 +418,29 @@ public class Demonic : MoveCharacter
|
|
|
public override void Attack1()
|
|
public override void Attack1()
|
|
|
{
|
|
{
|
|
|
base.Attack1();
|
|
base.Attack1();
|
|
|
|
|
+ Vector3 moveDir;
|
|
|
|
|
+ if (PlayerController.instance.bodyTrans.localScale.x > 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ moveDir = Vector3.left;
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ moveDir = Vector3.right;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (moveDir.x > 0.3f)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (bodyTrans.localScale.x > 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ Turn();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (moveDir.x < -0.3f)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (bodyTrans.localScale.x < 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ Turn();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
invincibleTime = totalAttack1Time;
|
|
invincibleTime = totalAttack1Time;
|
|
|
attackTarget = targetCharacter;
|
|
attackTarget = targetCharacter;
|
|
|
}
|
|
}
|