|
@@ -23,8 +23,7 @@ public class AttributeStatus : MonoBehaviour
|
|
|
private HitFeedbackSystem hitFeedbackSystem;
|
|
private HitFeedbackSystem hitFeedbackSystem;
|
|
|
|
|
|
|
|
//behit参数
|
|
//behit参数
|
|
|
- [HideInInspector] public bool haveNewSpecialStates;
|
|
|
|
|
-
|
|
|
|
|
|
|
+ [DisplayOnly] public bool canChangeHitStun;
|
|
|
[DisplayOnly] public SpecialState curSpecialStates = SpecialState.Null;
|
|
[DisplayOnly] public SpecialState curSpecialStates = SpecialState.Null;
|
|
|
|
|
|
|
|
[LabelText("控制时间")] [DisplayOnly] public float attributeTime;
|
|
[LabelText("控制时间")] [DisplayOnly] public float attributeTime;
|
|
@@ -96,13 +95,15 @@ public class AttributeStatus : MonoBehaviour
|
|
|
|
|
|
|
|
public void AddSpecialState(AttackInfo attackInfo, Character attackFrom)
|
|
public void AddSpecialState(AttackInfo attackInfo, Character attackFrom)
|
|
|
{
|
|
{
|
|
|
- if (!haveNewSpecialStates)
|
|
|
|
|
|
|
+ if (canChangeHitStun)
|
|
|
{
|
|
{
|
|
|
|
|
+ canChangeHitStun = false;
|
|
|
hitFeedbackSystem.EnterHitStun(attackFrom);
|
|
hitFeedbackSystem.EnterHitStun(attackFrom);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
hitFeedbackSystem.canHitStun = false;
|
|
hitFeedbackSystem.canHitStun = false;
|
|
|
- haveNewSpecialStates = false;
|
|
|
|
|
|
|
+ Debug.Log(curSpecialStates);
|
|
|
switch (curSpecialStates)
|
|
switch (curSpecialStates)
|
|
|
{
|
|
{
|
|
|
case SpecialState.FloatState:
|
|
case SpecialState.FloatState:
|
|
@@ -115,8 +116,10 @@ public class AttributeStatus : MonoBehaviour
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
|
case SpecialState.ShotDown:
|
|
case SpecialState.ShotDown:
|
|
|
|
|
+ Debug.Log(222);
|
|
|
if (!rb.useGravity)
|
|
if (!rb.useGravity)
|
|
|
{
|
|
{
|
|
|
|
|
+ Debug.Log(111);
|
|
|
AddShotDown(attackInfo.shotDown, attackFrom.transform.position.x < character.transform.position.x ? -1 : 1);
|
|
AddShotDown(attackInfo.shotDown, attackFrom.transform.position.x < character.transform.position.x ? -1 : 1);
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
@@ -124,6 +127,7 @@ public class AttributeStatus : MonoBehaviour
|
|
|
AddWeak(attackInfo.weak);
|
|
AddWeak(attackInfo.weak);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//CharacterState为SpecialStatus时调用此函数
|
|
//CharacterState为SpecialStatus时调用此函数
|
|
@@ -257,19 +261,24 @@ public class AttributeStatus : MonoBehaviour
|
|
|
//判断优先级,ture为优先级高于当前控制
|
|
//判断优先级,ture为优先级高于当前控制
|
|
|
public bool PriorityOrder(SpecialState specialState)
|
|
public bool PriorityOrder(SpecialState specialState)
|
|
|
{
|
|
{
|
|
|
- if (curSpecialStates != SpecialState.Null && curSpecialStates >= specialState)
|
|
|
|
|
|
|
+ if (curSpecialStates == SpecialState.Null)
|
|
|
{
|
|
{
|
|
|
curSpecialStates = specialState;
|
|
curSpecialStates = specialState;
|
|
|
- haveNewSpecialStates = true;
|
|
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
- if (curSpecialStates == SpecialState.Null)
|
|
|
|
|
|
|
+ else
|
|
|
{
|
|
{
|
|
|
- curSpecialStates = specialState;
|
|
|
|
|
- haveNewSpecialStates = true;
|
|
|
|
|
- return true;
|
|
|
|
|
|
|
+ if (curSpecialStates >= specialState)
|
|
|
|
|
+ {
|
|
|
|
|
+ curSpecialStates = specialState;
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ canChangeHitStun = true;
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- return true;
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//受到漂浮
|
|
//受到漂浮
|