|
|
@@ -48,6 +48,7 @@ public class AttributeStatus : MonoBehaviour
|
|
|
private Character landingDamageFrom;
|
|
|
private Vector3 startFlyPos;
|
|
|
|
|
|
+ [TabGroup("击飞击落")] [LabelText("旋转中心高度")] public float rotateCenterHeight = 1f;
|
|
|
[TabGroup("击飞击落")] [LabelText("起飞预设角度")] public float startFlyAngle = 15f;
|
|
|
[Tooltip("x为最小值,y为最大值")]
|
|
|
[TabGroup("击飞击落")] [LabelText("飞行预设角速度随机范围")] public Vector2 flyingRotateSpeedRange = new Vector2(15, 45);
|
|
|
@@ -312,6 +313,7 @@ public class AttributeStatus : MonoBehaviour
|
|
|
character.bodyCollider.layer = character.gameObject.layer;
|
|
|
vel = vel / 5f;
|
|
|
vel.y = jumpVel;
|
|
|
+ character.mecanim.transform.localPosition = Vector3.zero;
|
|
|
character.mecanim.transform.rotation = Quaternion.Euler(0, 0, 0);
|
|
|
character.transform.rotation = Quaternion.Euler(transform.rotation.eulerAngles.x, transform.rotation.eulerAngles.y, character.platformRotZ);
|
|
|
hitState = 1;
|
|
|
@@ -348,7 +350,10 @@ public class AttributeStatus : MonoBehaviour
|
|
|
vel.x += decelerationRatioX * Time.deltaTime;
|
|
|
}
|
|
|
vel.y -= decelerationRatioY * Time.deltaTime;
|
|
|
- character.mecanim.transform.Rotate(0, 0, flyingRotateSpeed * Time.deltaTime);
|
|
|
+ character.mecanim.transform.RotateAround(
|
|
|
+ transform.position + rotateCenterHeight * Vector3.up,
|
|
|
+ Vector3.forward,
|
|
|
+ flyingRotateSpeed * Time.deltaTime);
|
|
|
isFly = true;
|
|
|
}
|
|
|
break;
|
|
|
@@ -510,7 +515,7 @@ public class AttributeStatus : MonoBehaviour
|
|
|
rb.AddForce(vec3 * blowUp.force * (1 - resistances.BlowUp), ForceMode.Impulse);
|
|
|
rb.transform.rotation = Quaternion.Euler(0, 0, 0);
|
|
|
character.mecanim.transform.rotation = Quaternion.Euler(0, 0, startFlyAngle * attackDir);
|
|
|
- flyingRotateSpeed = -UnityEngine.Random.Range(flyingRotateSpeedRange.x, flyingRotateSpeedRange.y) * attackDir;
|
|
|
+ flyingRotateSpeed = UnityEngine.Random.Range(flyingRotateSpeedRange.x, flyingRotateSpeedRange.y) * attackDir;
|
|
|
startFlyPos = transform.position;
|
|
|
hitState = 0;
|
|
|
isFly = false;
|