|
|
@@ -23,16 +23,18 @@ public class MoveCharacter : Character
|
|
|
public float hurtChangeVelocity = 1;
|
|
|
|
|
|
[Header("新增漂浮效果参数")]
|
|
|
- public float maxSpeed = 10; //上升最大速度
|
|
|
- public float minSpeed = 2; //上升最小速度
|
|
|
- public float height = 8; //上升高度
|
|
|
+ public float maxSpeed = 15; //上升最大速度
|
|
|
+ public float minSpeed = 6; //上升最小速度
|
|
|
+ public float maxHeight = 12; //最大上升高度
|
|
|
+ public float minHeight = 7; //最小上升高度
|
|
|
|
|
|
- public float maxRotateSpeed = 10; //最大旋转速度
|
|
|
- public float minRotateSpeed = 4; //最小旋转速度
|
|
|
+ public float maxRotateSpeed; //最大旋转速度
|
|
|
+ public float minRotateSpeed; //最小旋转速度
|
|
|
|
|
|
- public float floatTime = 5; //漂浮时间
|
|
|
- private float curTime; //漂浮已进行时长
|
|
|
+ public float floatTime = 20; //漂浮时间
|
|
|
|
|
|
+ private float curTime; //漂浮已进行时长
|
|
|
+ private float height; //漂浮高度
|
|
|
private float floatSpeed; //漂浮速度
|
|
|
private float curHeight; //当前所在高度
|
|
|
private float rotateSpeed; //旋转速度
|
|
|
@@ -48,6 +50,12 @@ public class MoveCharacter : Character
|
|
|
|
|
|
public void FloatStateOn()
|
|
|
{
|
|
|
+ maxSpeed = 15;
|
|
|
+ minSpeed = 6;
|
|
|
+ maxHeight = 9;
|
|
|
+ minHeight = 6;
|
|
|
+
|
|
|
+ floatTime = 20;
|
|
|
ChangeState(CharacterState.Rise);
|
|
|
floatState = 1;
|
|
|
floatSpeed = Random.Range(minSpeed, maxSpeed);
|
|
|
@@ -56,6 +64,10 @@ public class MoveCharacter : Character
|
|
|
curTime = 0;
|
|
|
rotateSpeed = Random.Range(minRotateSpeed, maxRotateSpeed);
|
|
|
rotateDir = (1.5f - Random.Range(1, 3)) * 2;
|
|
|
+ height = Random.Range(minHeight, maxHeight);
|
|
|
+ print(minHeight);
|
|
|
+ print(maxHeight);
|
|
|
+ print(height);
|
|
|
}
|
|
|
|
|
|
private void RotateSelf()
|