|
|
@@ -19,8 +19,11 @@ public class Demonic : MoveCharacter
|
|
|
public int baseSortingOrder;
|
|
|
int sortingOrder = 0;
|
|
|
public float runSpeed;
|
|
|
+
|
|
|
+ [Header("Ëø»êËþ")]
|
|
|
public bool isReturnSoulTower;
|
|
|
public Vector3 origSoulPos;
|
|
|
+ public bool isRecorded;
|
|
|
|
|
|
[Header("ÓÑ·½µ¥Î»×é¼þ")]
|
|
|
public SearchState searchState;
|
|
|
@@ -68,6 +71,16 @@ public class Demonic : MoveCharacter
|
|
|
OnState();
|
|
|
}
|
|
|
|
|
|
+ private void Update()
|
|
|
+ {
|
|
|
+ base.Update();
|
|
|
+ if (isInSoulTower && targetCharacter == null && state != CharacterState.LockSoul && !isReturnSoulTower)
|
|
|
+ {
|
|
|
+ isReturnSoulTower = true;
|
|
|
+ ChangeState(CharacterState.LockSoul);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public bool SearchTarget()
|
|
|
{
|
|
|
targetCharacter = searchTrigger.GetMinDisTarget(targetTypes, canHitFly);
|
|
|
@@ -579,7 +592,7 @@ public class Demonic : MoveCharacter
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- if (transform.position.x - origSoulPos.x >= 0.5f)
|
|
|
+ if (transform.position.x - origSoulPos.x >= 0.2f)
|
|
|
{
|
|
|
rb.velocity = Vector3.right * (-moveSpeed + velocityAddition);
|
|
|
if (bodyTrans.localScale.x < 0)
|
|
|
@@ -587,7 +600,7 @@ public class Demonic : MoveCharacter
|
|
|
Turn();
|
|
|
}
|
|
|
}
|
|
|
- else if (origSoulPos.x - transform.position.x >= 0.5f)
|
|
|
+ else if (origSoulPos.x - transform.position.x >= 0.2f)
|
|
|
{
|
|
|
rb.velocity = Vector3.right * (moveSpeed + velocityAddition);
|
|
|
if (bodyTrans.localScale.x > 0)
|
|
|
@@ -597,6 +610,7 @@ public class Demonic : MoveCharacter
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+ rb.velocity = Vector3.zero;
|
|
|
transform.position = origSoulPos;
|
|
|
isReturnSoulTower = false;
|
|
|
targetCharacter = null;
|