From 8b65edb43be0945203633b33d7a62c81ab3f05ce Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 16 Sep 2021 09:52:33 +0800 Subject: +unit effect --- Assets/Scripts/Unit/Components/UnitState/PCState.cs | 10 ++++++---- Assets/Scripts/Unit/Components/UnitState/PCState_States.cs | 6 ++++-- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'Assets/Scripts/Unit/Components/UnitState') diff --git a/Assets/Scripts/Unit/Components/UnitState/PCState.cs b/Assets/Scripts/Unit/Components/UnitState/PCState.cs index afedf6d8..c7cab21c 100644 --- a/Assets/Scripts/Unit/Components/UnitState/PCState.cs +++ b/Assets/Scripts/Unit/Components/UnitState/PCState.cs @@ -131,7 +131,7 @@ public partial class PCState : UnitState } } - void TryTeleport() + bool TryTeleport() { if (Input.GetKeyDown("i")) //if (InputManager.Instance.TryCommand(0.5f, KeyCode.I)) @@ -139,12 +139,14 @@ public partial class PCState : UnitState float offset = owner.isTowardRight ? 1.5f : -1.5f; owner.center = TestErika.Instance.monster.owner.center + new Vector3(offset, -0.5f, 0); TurnAround(!owner.isTowardRight); + return true; } + return false; } - void TryBlink() + bool TryBlink() { - + return false; } bool TryTianyin() @@ -161,7 +163,7 @@ public partial class PCState : UnitState bool TryAttackToAir() { - if(Input.GetKey("s") && Input.GetKeyDown("j")) + if(Input.GetKey("w") && Input.GetKeyDown("j")) { ChangeState(EUnitState.AttackToAir, new SkillParam()); return true; diff --git a/Assets/Scripts/Unit/Components/UnitState/PCState_States.cs b/Assets/Scripts/Unit/Components/UnitState/PCState_States.cs index 7860e2af..738cc7ce 100644 --- a/Assets/Scripts/Unit/Components/UnitState/PCState_States.cs +++ b/Assets/Scripts/Unit/Components/UnitState/PCState_States.cs @@ -212,9 +212,11 @@ public partial class PCState : UnitState InputManager.Instance.ClearCommand(); while (true) { - TryTeleport(); + if (TryTeleport()) + { + } - TryTianyin(); + TryTianyin(); if (isComboOpen) { -- cgit v1.1-26-g67d0