summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_1.asset5
-rw-r--r--Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_2.asset4
-rw-r--r--Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_3.asset5
-rw-r--r--Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_4.asset6
-rw-r--r--Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_5.asset3
-rw-r--r--Assets/Bundle/Unit/PC/Erika/AnimationData/Attack_Jump_to_Air.asset3
-rw-r--r--Assets/Bundle/Unit/PC/Erika/Prefabs/Erika_Robot.prefab4
-rw-r--r--Assets/Scripts/Input/InputManager.cs59
-rw-r--r--Assets/Scripts/Unit/AnimationData.cs1
-rw-r--r--Assets/Scripts/Unit/Collider/ColliderBox_Hitbox.cs4
-rw-r--r--Assets/Scripts/Unit/Components/UnitState/PCState.cs13
-rw-r--r--Assets/Scripts/Unit/Controller/PCController.cs2
12 files changed, 70 insertions, 39 deletions
diff --git a/Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_1.asset b/Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_1.asset
index 323a0783..cae0b6e4 100644
--- a/Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_1.asset
+++ b/Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_1.asset
@@ -31,6 +31,7 @@ MonoBehaviour:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
+ freezeGlobal: 0
freezeFramesSelf: 0
freezeFramesOther: 0
sparkPath: Assets/Art/Vfx/Hit & Slashes Vol.3/Prefabs/hit-line-1.prefab
@@ -113,7 +114,7 @@ MonoBehaviour:
toggles:
m_keys: 00000000
m_values:
- - from: 0.3
+ - from: 0.35
to: 1
parameters:
m_keys:
@@ -140,7 +141,7 @@ MonoBehaviour:
bone:
position: {x: 0, y: 0.8, z: 0}
rotation: {x: -24.814, y: 33.032, z: -30.331}
- scale: {x: 0.6, y: 0.6, z: 0.6}
+ scale: {x: 0.7, y: 0.7, z: 0.7}
--- !u!114 &114480333145456874
MonoBehaviour:
m_ObjectHideFlags: 0
diff --git a/Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_2.asset b/Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_2.asset
index 18616499..19125755 100644
--- a/Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_2.asset
+++ b/Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_2.asset
@@ -29,6 +29,7 @@ MonoBehaviour:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
+ freezeGlobal: 0
freezeFramesSelf: 0
freezeFramesOther: 0
sparkPath:
@@ -67,6 +68,7 @@ MonoBehaviour:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
+ freezeGlobal: 0
freezeFramesSelf: 0
freezeFramesOther: 0
sparkPath: Assets/Art/Vfx/Hit & Slashes Vol.3/Prefabs/hit-line-1.prefab
@@ -180,4 +182,4 @@ MonoBehaviour:
bone:
position: {x: 0, y: 0.8, z: 0}
rotation: {x: 16.405, y: -122.817, z: 27.753}
- scale: {x: 0.6, y: 0.6, z: 0.6}
+ scale: {x: 0.7, y: 0.7, z: 0.7}
diff --git a/Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_3.asset b/Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_3.asset
index 1e4c20b5..5f4f3c83 100644
--- a/Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_3.asset
+++ b/Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_3.asset
@@ -30,6 +30,7 @@ MonoBehaviour:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
+ freezeGlobal: 0
freezeFramesSelf: 0
freezeFramesOther: 0
sparkPath: Assets/Art/Vfx/Hit & Slashes Vol.3/Prefabs/hit-line-1.prefab
@@ -120,7 +121,7 @@ MonoBehaviour:
toggles:
m_keys: 00000000
m_values:
- - from: 0.3
+ - from: 0.4
to: 1
parameters:
m_keys:
@@ -147,4 +148,4 @@ MonoBehaviour:
bone:
position: {x: 0, y: 1.2, z: 0}
rotation: {x: -85.16, y: 0, z: 0}
- scale: {x: 0.6, y: 0.6, z: 0.6}
+ scale: {x: 0.7, y: 0.7, z: 0.7}
diff --git a/Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_4.asset b/Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_4.asset
index 35ad051a..5ef74246 100644
--- a/Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_4.asset
+++ b/Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_4.asset
@@ -29,6 +29,7 @@ MonoBehaviour:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
+ freezeGlobal: 0
freezeFramesSelf: 0
freezeFramesOther: 0
sparkPath:
@@ -75,6 +76,7 @@ MonoBehaviour:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
+ freezeGlobal: 0
freezeFramesSelf: 0
freezeFramesOther: 0
sparkPath: Assets/Art/Vfx/Hit & Slashes Vol.3/Prefabs/hit-line-1.prefab
@@ -188,7 +190,7 @@ MonoBehaviour:
toggles:
m_keys: 00000000
m_values:
- - from: 0.45
+ - from: 0.5
to: 1
parameters:
m_keys:
@@ -216,4 +218,4 @@ MonoBehaviour:
bone:
position: {x: 0, y: 0.3, z: 0}
rotation: {x: 30.204, y: 15.196, z: -14.663}
- scale: {x: 0.6, y: 0.6, z: 0.6}
+ scale: {x: 0.7, y: 0.7, z: 0.7}
diff --git a/Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_5.asset b/Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_5.asset
index cf4c4953..3ea37260 100644
--- a/Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_5.asset
+++ b/Assets/Bundle/Unit/PC/Erika/AnimationData/Air_Combo03_Z0_5.asset
@@ -30,6 +30,7 @@ MonoBehaviour:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
+ freezeGlobal: 0
freezeFramesSelf: 0
freezeFramesOther: 0
sparkPath: Assets/Art/Vfx/Hit & Slashes Vol.3/Prefabs/hit-line-1.prefab
@@ -130,4 +131,4 @@ MonoBehaviour:
bone:
position: {x: 0, y: 1.7, z: 0}
rotation: {x: -416.096, y: 90.00001, z: 270}
- scale: {x: 0.6, y: 0.6, z: -0.6}
+ scale: {x: 0.7, y: 0.7, z: -0.7}
diff --git a/Assets/Bundle/Unit/PC/Erika/AnimationData/Attack_Jump_to_Air.asset b/Assets/Bundle/Unit/PC/Erika/AnimationData/Attack_Jump_to_Air.asset
index 54dd0273..6570f37a 100644
--- a/Assets/Bundle/Unit/PC/Erika/AnimationData/Attack_Jump_to_Air.asset
+++ b/Assets/Bundle/Unit/PC/Erika/AnimationData/Attack_Jump_to_Air.asset
@@ -30,6 +30,7 @@ MonoBehaviour:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
+ freezeGlobal: 0
freezeFramesSelf: 0
freezeFramesOther: 0
sparkPath:
@@ -99,7 +100,7 @@ MonoBehaviour:
toggles:
m_keys: 00000000
m_values:
- - from: 0.2
+ - from: 0.25
to: 1
parameters:
m_keys:
diff --git a/Assets/Bundle/Unit/PC/Erika/Prefabs/Erika_Robot.prefab b/Assets/Bundle/Unit/PC/Erika/Prefabs/Erika_Robot.prefab
index c5b0e838..4cf8a46c 100644
--- a/Assets/Bundle/Unit/PC/Erika/Prefabs/Erika_Robot.prefab
+++ b/Assets/Bundle/Unit/PC/Erika/Prefabs/Erika_Robot.prefab
@@ -58,8 +58,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1357685695}
m_LocalRotation: {x: -0.24720925, y: -0.40268856, z: 0.18871981, w: -0.86088}
- m_LocalPosition: {x: 0.198, y: -0.172, z: 0.244}
- m_LocalScale: {x: 0.01006957, y: 0.014763792, z: 1.1182132}
+ m_LocalPosition: {x: 0.1611, y: -0.1365, z: 0.21}
+ m_LocalScale: {x: 0.01006957, y: 0.014763792, z: 0.9952188}
m_Children:
- {fileID: 2135912540}
- {fileID: 332159091}
diff --git a/Assets/Scripts/Input/InputManager.cs b/Assets/Scripts/Input/InputManager.cs
index 4ad6ec02..6b200462 100644
--- a/Assets/Scripts/Input/InputManager.cs
+++ b/Assets/Scripts/Input/InputManager.cs
@@ -59,30 +59,41 @@ public class InputManager : SingletonMB<InputManager>
public bool TryCommand(float interval = 0.5f, params KeyCode[] keys)
{
- if (keys.Length > m_CommandQueue.Count)
- return false;
- if (!Input.GetKey(keys[keys.Length - 1]))
+ return TryCommand(interval, true, keys);
+
+ }
+
+ public bool TryCommand(float interval = 0.5f, bool checkInput = false, params KeyCode[] keys)
+ {
+ if (keys.Length > m_CommandQueue.Count)
return false;
- int count = m_CommandQueue.Count;
- float preTime = m_CommandQueue[count - keys.Length].time;
- for (int i = 0; i < keys.Length; ++i)
- {
- if(keys[i] == m_CommandQueue[i + count - keys.Length].key)
- {
- if(m_CommandQueue[i + count - keys.Length].time - preTime > interval)
- {
- return false;
- }
- preTime = m_CommandQueue[i + count - keys.Length].time;
- }
- else
- {
- return false;
- }
- }
- //m_CommandQueue.RemoveRange(count - keys.Length, keys.Length);
- m_CommandQueue.Clear();
- return true;
- }
+ if (checkInput && !Input.GetKey(keys[keys.Length - 1]))
+ return false;
+ int count = m_CommandQueue.Count;
+ float preTime = m_CommandQueue[count - keys.Length].time;
+ for (int i = 0; i < keys.Length; ++i)
+ {
+ if (keys[i] == m_CommandQueue[i + count - keys.Length].key)
+ {
+ if (m_CommandQueue[i + count - keys.Length].time - preTime > interval)
+ {
+ return false;
+ }
+ preTime = m_CommandQueue[i + count - keys.Length].time;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ //m_CommandQueue.RemoveRange(count - keys.Length, keys.Length);
+ m_CommandQueue.Clear(); // 清理
+ return true;
+ }
+
+ public void ClearCommand()
+ {
+ m_CommandQueue.Clear();
+ }
}
diff --git a/Assets/Scripts/Unit/AnimationData.cs b/Assets/Scripts/Unit/AnimationData.cs
index ead0f16d..b4907239 100644
--- a/Assets/Scripts/Unit/AnimationData.cs
+++ b/Assets/Scripts/Unit/AnimationData.cs
@@ -81,6 +81,7 @@ public enum EAnimationProperty
ComboTimeOffset = 1,
IgnoreY = 2,
TransitionInDuration = 3,
+
}
[Serializable]
diff --git a/Assets/Scripts/Unit/Collider/ColliderBox_Hitbox.cs b/Assets/Scripts/Unit/Collider/ColliderBox_Hitbox.cs
index b765265c..9f1d629a 100644
--- a/Assets/Scripts/Unit/Collider/ColliderBox_Hitbox.cs
+++ b/Assets/Scripts/Unit/Collider/ColliderBox_Hitbox.cs
@@ -62,7 +62,9 @@ public partial class ColliderBox
[Comment("[ 击中效果 ]", TextAnchor.MiddleCenter)]
- [Foldout("时间效果", 2)]
+ [Foldout("时间效果", 3)]
+ [Tooltip("全局顿帧")]
+ public float freezeGlobal;
[Tooltip("自身顿帧")]
public float freezeFramesSelf;
//[WhenNot("freezeFramesSelf", 0)]
diff --git a/Assets/Scripts/Unit/Components/UnitState/PCState.cs b/Assets/Scripts/Unit/Components/UnitState/PCState.cs
index b8512d64..c332dcda 100644
--- a/Assets/Scripts/Unit/Components/UnitState/PCState.cs
+++ b/Assets/Scripts/Unit/Components/UnitState/PCState.cs
@@ -278,12 +278,14 @@ public class PCState : UnitState
{
m_Owner.pcAnimation.AnimAttackToAir(param.offset);
yield return null;
+ InputManager.Instance.ClearCommand();
while (true)
{
bool canCombo = m_Owner.pcAnimation.baseLayer.IsToggleOpen(EAnimationToogle.Combo);
if(canCombo)
{
- if(Input.GetKeyDown("j"))
+ //if(Input.GetKeyDown("j"))
+ if(InputManager.Instance.TryCommand(0.5f, false, KeyCode.J))
{
ChangeState(EUnitState.AirAttack, new SkillParam());
}
@@ -308,10 +310,11 @@ public class PCState : UnitState
IEnumerator AirAttack(SkillParam param)
{
- int total = 5;
+ int total = 5;
int id = 0;
m_Owner.pcAnimation.AnimAirAttack(id++);
yield return null; // 等待animator更新
+ InputManager.Instance.ClearCommand();
while (true)
{
bool canCombo = m_Owner.pcAnimation.baseLayer.IsToggleOpen(EAnimationToogle.Combo);
@@ -328,7 +331,7 @@ public class PCState : UnitState
ChangeState(EUnitState.AirDash, new AirDashParam());
}
- if (Input.GetKeyDown("j"))
+ if (InputManager.Instance.TryCommand(0.3f, false, KeyCode.J))
{
if (Input.GetKey("a"))
{
@@ -477,6 +480,10 @@ public class PCState : UnitState
TurnAround(true);
pos.x += vz * Time.deltaTime;
}
+ if(Input.GetKeyDown("j"))
+ {
+ ChangeState(EUnitState.AirAttack, new SkillParam());
+ }
m_Owner.transform.position = pos;
if (pos.y > 0 && pos.y <= 1 && !landingGround)
{
diff --git a/Assets/Scripts/Unit/Controller/PCController.cs b/Assets/Scripts/Unit/Controller/PCController.cs
index 851fb80a..2294ae62 100644
--- a/Assets/Scripts/Unit/Controller/PCController.cs
+++ b/Assets/Scripts/Unit/Controller/PCController.cs
@@ -39,6 +39,8 @@ public class PCController : UnitController
public override void OnHit(CollisionInfo info)
{
+ ColliderBox hitbox = info.collider.colliderInfo.collider;
+ Debug.Assert(hitbox.type == ColliderBox.EColliderType.HitBox);
}
public override void OnGetHit(CollisionInfo info)