89 lines
3.3 KiB
C#
89 lines
3.3 KiB
C#
|
using Thousandto.Core.Asset;
|
|||
|
using Thousandto.Core.PostEffect;
|
|||
|
using Thousandto.Plugins.Common.UniScene;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
[ExecuteInEditMode]
|
|||
|
public class FlyTeleportNodeScript : MonoBehaviour
|
|||
|
{
|
|||
|
public string EnterAnim = string.Empty; //进入本节点播放的动画
|
|||
|
public float EnterAnimSpeed = 1f; //进入本节点播放的动画速度
|
|||
|
public bool EnterIsLoop = false; //进入本节点的动画是否循环
|
|||
|
public string LeaveAnim = string.Empty; //离开本节点播放的动画
|
|||
|
public float LeaveAnimSpeed = 1f; //离开本节点播放的动画速度
|
|||
|
public bool LeaveIsLoop = false; //离开本节点的动画是否循环
|
|||
|
public float WaitTime = 0f; //在本节点等待的时间
|
|||
|
public float MoveTime = 0f;
|
|||
|
public AnimationCurve MoveCurve = null;
|
|||
|
public float Distance = 0f; //本关键点的长度
|
|||
|
public float Percent = 0f; //本关键点在曲线上的位置
|
|||
|
public bool BreakPoint = false; //是否是分割点,曲线从这分割
|
|||
|
|
|||
|
public float CameraYaw = 0f;
|
|||
|
public float CameraPitch = 25f;
|
|||
|
public float CameraFlowDis = 10f;
|
|||
|
public float CameraOffsetX = 0f;
|
|||
|
public float CameraOffsetY = 0f;
|
|||
|
public AnimationCurve CameraCurve = null;
|
|||
|
|
|||
|
public bool CameraShake = false; //摄像机震动
|
|||
|
public float ShakePower = 1f; //震动力度
|
|||
|
public float ShakeTime = 1f; //震动时间
|
|||
|
public VFXCameraShakerType ShakeType = VFXCameraShakerType.Default;//震动类型
|
|||
|
public AnimationCurve ShakeCurve = null;//震动曲线
|
|||
|
|
|||
|
public bool CameraBlur = false; //摄像机模糊
|
|||
|
public float BlurWaitTime = 0f;//延迟时间
|
|||
|
public float BlurStart = 0f;//开始值
|
|||
|
public float BlurEnd = 0f;//结束值
|
|||
|
public float BlurTime = 1f;//模糊时间
|
|||
|
|
|||
|
public ModelTypeCode VfxType = ModelTypeCode.OtherVFX;
|
|||
|
public int VfxID = 0;
|
|||
|
public bool VfxIsLoop = false;
|
|||
|
public float VfxLifeTime = 0f;
|
|||
|
public Slot VfxSlot = Slot.Origin;
|
|||
|
|
|||
|
public void InitWithData(FlyTeleportNodeCfgData data)
|
|||
|
{
|
|||
|
EnterAnim = data.EnterAnim;
|
|||
|
EnterAnimSpeed = data.EnterAnimSpeed;
|
|||
|
EnterIsLoop = data.EnterIsLoop;
|
|||
|
LeaveAnim = data.LeaveAnim;
|
|||
|
LeaveAnimSpeed = data.LeaveAnimSpeed;
|
|||
|
LeaveIsLoop = data.LeaveIsLoop;
|
|||
|
WaitTime = data.WaitTime;
|
|||
|
MoveTime = data.MoveTime;
|
|||
|
MoveCurve = data.MoveCurve;
|
|||
|
Distance = data.Distance;
|
|||
|
Percent = data.Percent;
|
|||
|
BreakPoint = data.BreakPoint;
|
|||
|
CameraYaw = data.CameraYaw;
|
|||
|
CameraPitch = data.CameraPitch;
|
|||
|
CameraFlowDis = data.CameraFlowDis;
|
|||
|
CameraOffsetX = data.CameraOffsetX;
|
|||
|
CameraOffsetY = data.CameraOffsetY;
|
|||
|
CameraCurve = data.CameraCurve;
|
|||
|
|
|||
|
CameraShake = data.CameraShake;
|
|||
|
ShakePower = data.ShakePower;
|
|||
|
ShakeTime = data.ShakeTime;
|
|||
|
ShakeType = data.ShakeType;
|
|||
|
ShakeCurve = data.ShakeCurve;
|
|||
|
|
|||
|
CameraBlur = data.CameraBlur;
|
|||
|
BlurWaitTime = data.BlurWaitTime;
|
|||
|
BlurStart = data.BlurStart;
|
|||
|
BlurEnd = data.BlurEnd;
|
|||
|
BlurTime = data.BlurTime;
|
|||
|
|
|||
|
VfxType = data.VfxType;
|
|||
|
VfxID = data.VfxID;
|
|||
|
VfxIsLoop = data.VfxIsLoop;
|
|||
|
VfxLifeTime = data.VfxLifeTime;
|
|||
|
VfxSlot = data.VfxSlot;
|
|||
|
|
|||
|
transform.position = data.Pos;
|
|||
|
}
|
|||
|
}
|