|
@@ -23,7 +23,7 @@ public class AttributeStatus : MonoBehaviour
|
|
|
|
|
|
|
|
public SpecialState curSpecialStates = SpecialState.Null;
|
|
public SpecialState curSpecialStates = SpecialState.Null;
|
|
|
|
|
|
|
|
- [Header("各状态时间")]
|
|
|
|
|
|
|
+ [Header("控制时间")]
|
|
|
[DisplayOnly] public float attributeTime;
|
|
[DisplayOnly] public float attributeTime;
|
|
|
|
|
|
|
|
//抗性
|
|
//抗性
|
|
@@ -46,12 +46,8 @@ public class AttributeStatus : MonoBehaviour
|
|
|
}
|
|
}
|
|
|
[LabelText("抗性")]public Resistances resistances;
|
|
[LabelText("抗性")]public Resistances resistances;
|
|
|
|
|
|
|
|
- [FoldoutGroup("击飞/击落")] [DisplayOnly] public int hitState;
|
|
|
|
|
- [FoldoutGroup("击飞/击落")] [LabelText("X方向阻力")] public float decelerationRatioX = 2f;
|
|
|
|
|
- [FoldoutGroup("击飞/击落")] [LabelText("Y方向阻力")] public float decelerationRatioY = 15f;
|
|
|
|
|
-
|
|
|
|
|
- [FoldoutGroup("漂浮")]
|
|
|
|
|
- [DisplayOnly]public int floatingState; //0:不漂浮;1:漂浮中;2:飘着;3:掉下去
|
|
|
|
|
|
|
+ [TabGroup("漂浮")]
|
|
|
|
|
+ [DisplayOnly] public int floatingState; //0:不漂浮;1:漂浮中;2:飘着;3:掉下去
|
|
|
private Vector3 origPos; //初始位置
|
|
private Vector3 origPos; //初始位置
|
|
|
private float curHeight; //当前所在高度
|
|
private float curHeight; //当前所在高度
|
|
|
private float riseTime; //上升时间
|
|
private float riseTime; //上升时间
|
|
@@ -62,9 +58,13 @@ public class AttributeStatus : MonoBehaviour
|
|
|
private float rise = 1;
|
|
private float rise = 1;
|
|
|
private float normalFallSpeed = 15f;
|
|
private float normalFallSpeed = 15f;
|
|
|
|
|
|
|
|
- [FoldoutGroup("易伤")]
|
|
|
|
|
|
|
+ [TabGroup("击飞击落")] [DisplayOnly] public int hitState;
|
|
|
|
|
+ [TabGroup("击飞击落")] [LabelText("X方向阻力")] public float decelerationRatioX = 2f;
|
|
|
|
|
+ [TabGroup("击飞击落")] [LabelText("Y方向阻力")] public float decelerationRatioY = 15f;
|
|
|
|
|
+
|
|
|
|
|
+ [TabGroup("易伤")]
|
|
|
[DisplayOnly] public bool haveVulnerable;
|
|
[DisplayOnly] public bool haveVulnerable;
|
|
|
- [FoldoutGroup("易伤")]
|
|
|
|
|
|
|
+ [TabGroup("易伤")]
|
|
|
[DisplayOnly] public float vulnerableTime;
|
|
[DisplayOnly] public float vulnerableTime;
|
|
|
private float vulnerableRate;
|
|
private float vulnerableRate;
|
|
|
|
|
|
|
@@ -157,6 +157,7 @@ public class AttributeStatus : MonoBehaviour
|
|
|
if (foot.TrigGround && vel.y <= 0.01f)
|
|
if (foot.TrigGround && vel.y <= 0.01f)
|
|
|
{
|
|
{
|
|
|
vel = Vector3.zero;
|
|
vel = Vector3.zero;
|
|
|
|
|
+ character.ani.Play("weak", 0, 0);
|
|
|
hitState = 1;
|
|
hitState = 1;
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|