summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Unit/Components/UnitState
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts/Unit/Components/UnitState')
-rw-r--r--Assets/Scripts/Unit/Components/UnitState/PCState.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Assets/Scripts/Unit/Components/UnitState/PCState.cs b/Assets/Scripts/Unit/Components/UnitState/PCState.cs
index 060d6e91..e545dea0 100644
--- a/Assets/Scripts/Unit/Components/UnitState/PCState.cs
+++ b/Assets/Scripts/Unit/Components/UnitState/PCState.cs
@@ -139,9 +139,14 @@ public partial class PCState : UnitState
bool TryTeleport()
{
if (Input.GetKeyDown("i"))
- //if (InputManager.Instance.TryCommand(0.5f, KeyCode.I))
{
float offset = owner.isTowardRight ? 1.5f : -1.5f;
+
+ UnitSnapshotInfo info = owner.TakeSnapshot();
+ Vector2 dir = TestErika.Instance.monster.owner.center + new Vector3(offset, -0.5f, 0) - owner.center;
+ LensEffect_Dash dash = new LensEffect_Dash(Color.white, 2, Mathf.Atan2(dir.y, dir.x), info);
+ owner.unitLensEffect.AddEffect(dash);
+
owner.center = TestErika.Instance.monster.owner.center + new Vector3(offset, -0.5f, 0);
TurnAround(!owner.isTowardRight);
return true;