891 lines
44 KiB
C#
891 lines
44 KiB
C#
|
using Thousandto.Code.Logic;
|
|||
|
using Thousandto.Core.PostEffect;
|
|||
|
using Thousandto.SkillEditor;
|
|||
|
using Thousandto.SkillEditor.Support;
|
|||
|
using System;
|
|||
|
using System.Linq;
|
|||
|
using UnityEditor;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
namespace Thousandto.SkillEditor.DIY
|
|||
|
{
|
|||
|
class SkillEventEditor : EditorWindow
|
|||
|
{
|
|||
|
public static SkillBaseEventInfo EventInfo = null;
|
|||
|
public static int SelectFrame = 0;
|
|||
|
public static bool IsOpen = false;
|
|||
|
public static void Open(SkillBaseEventInfo info)
|
|||
|
{
|
|||
|
var win = (SkillEventEditor)EditorWindow.GetWindow(typeof(SkillEventEditor), true);
|
|||
|
win.Show();
|
|||
|
var size = GetWindowSize(info.EventType);
|
|||
|
win.minSize = size;
|
|||
|
win.maxSize = size;
|
|||
|
|
|||
|
SelectFrame = info.EventFrame;
|
|||
|
EventInfo = info;
|
|||
|
IsOpen = true;
|
|||
|
win.RefreshResList();
|
|||
|
}
|
|||
|
|
|||
|
private static Vector2 GetWindowSize(SkillEventDefine type)
|
|||
|
{
|
|||
|
switch (type)
|
|||
|
{
|
|||
|
case SkillEventDefine.PlayLockTrajectory:
|
|||
|
case SkillEventDefine.PlaySimpleSkillObject:
|
|||
|
case SkillEventDefine.PlayLinkDamage:
|
|||
|
return new Vector2(512, 569);
|
|||
|
case SkillEventDefine.PlayHit:
|
|||
|
return new Vector2(512, 500);
|
|||
|
}
|
|||
|
return new Vector2(512, 256);
|
|||
|
}
|
|||
|
|
|||
|
public static void Hide()
|
|||
|
{
|
|||
|
if (!IsOpen)
|
|||
|
return;
|
|||
|
var win = (SkillEventEditor)EditorWindow.GetWindow(typeof(SkillEventEditor));
|
|||
|
win.Close();
|
|||
|
}
|
|||
|
|
|||
|
public string[] CameraShakeNames = new string[]
|
|||
|
{
|
|||
|
"上下",
|
|||
|
"水平",
|
|||
|
"随机",
|
|||
|
"冲压",
|
|||
|
};
|
|||
|
|
|||
|
public string[] CameraBlurNames = new string[]
|
|||
|
{
|
|||
|
"辐射状模糊",
|
|||
|
"高斯模糊",
|
|||
|
};
|
|||
|
|
|||
|
public string[] SkillAreaNames = new string[]
|
|||
|
{
|
|||
|
"矩形",
|
|||
|
"扇形",
|
|||
|
"圆形",
|
|||
|
};
|
|||
|
|
|||
|
public string[] PosTypeNames = new string[]
|
|||
|
{
|
|||
|
"自身位置",
|
|||
|
"目标位置"
|
|||
|
};
|
|||
|
|
|||
|
public string[] SkillObjMoveNames = new string[]
|
|||
|
{
|
|||
|
"不移动",
|
|||
|
"固定方向",
|
|||
|
"追踪移动"
|
|||
|
};
|
|||
|
|
|||
|
public string[] SelfMoveTypeNames = new string[]
|
|||
|
{
|
|||
|
"目标面前",
|
|||
|
"目标背后",
|
|||
|
"固定距离",
|
|||
|
"后退"
|
|||
|
};
|
|||
|
public string[] LinkDamageType = new string[]
|
|||
|
{
|
|||
|
"串联",
|
|||
|
"并联",
|
|||
|
};
|
|||
|
public string[] LinkStartPosType = new string[]
|
|||
|
{
|
|||
|
"使用者",
|
|||
|
"目标",
|
|||
|
};
|
|||
|
public int SelectEvent = 0;
|
|||
|
|
|||
|
private int _slotSelectIndex = 0;
|
|||
|
private int _slotSelectIndex2 = 0;
|
|||
|
private int _slotSelectIndex3 = 0;
|
|||
|
private string[] _slotArray = null;
|
|||
|
|
|||
|
private float _resetHeight = 0f;
|
|||
|
|
|||
|
void RefreshResList()
|
|||
|
{
|
|||
|
_slotSelectIndex = 0;
|
|||
|
_slotArray = SkillResPathEditor.Slots.ToArray();
|
|||
|
|
|||
|
if (EventInfo != null)
|
|||
|
{
|
|||
|
switch (EventInfo.EventType)
|
|||
|
{
|
|||
|
case SkillEventDefine.PlayVfx:
|
|||
|
{
|
|||
|
var realData = EventInfo as PlayVfxEventInfo;
|
|||
|
for (int i = 0; i < _slotArray.Length; ++i)
|
|||
|
{
|
|||
|
if (_slotArray[i] == realData.SlotName)
|
|||
|
{
|
|||
|
_slotSelectIndex = i;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
break;
|
|||
|
case SkillEventDefine.PlayLockTrajectory:
|
|||
|
{
|
|||
|
var realData = EventInfo as PlayLockTrajectoryEventInfo;
|
|||
|
for (int i = 0; i < _slotArray.Length; ++i)
|
|||
|
{
|
|||
|
if (_slotArray[i] == realData.HitInfo.HitSlot)
|
|||
|
{
|
|||
|
_slotSelectIndex = i;
|
|||
|
}
|
|||
|
|
|||
|
if (_slotArray[i] == realData.StartSlot)
|
|||
|
{
|
|||
|
_slotSelectIndex2 = i;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
break;
|
|||
|
case SkillEventDefine.PlayHit:
|
|||
|
{
|
|||
|
var realData = EventInfo as PlayHitEventInfo;
|
|||
|
for (int i = 0; i < _slotArray.Length; ++i)
|
|||
|
{
|
|||
|
if (_slotArray[i] == realData.HitInfo.HitSlot)
|
|||
|
{
|
|||
|
_slotSelectIndex = i;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
break;
|
|||
|
case SkillEventDefine.PlaySimpleSkillObject:
|
|||
|
{
|
|||
|
var realData = EventInfo as PlaySimpleSkillObjectEventInfo;
|
|||
|
for (int i = 0; i < _slotArray.Length; ++i)
|
|||
|
{
|
|||
|
if (_slotArray[i] == realData.HitInfo.HitSlot)
|
|||
|
{
|
|||
|
_slotSelectIndex = i;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
break;
|
|||
|
case SkillEventDefine.PlayLinkDamage:
|
|||
|
{
|
|||
|
var realData = EventInfo as PlayLinkDamageEventInfo;
|
|||
|
for (int i = 0; i < _slotArray.Length; ++i)
|
|||
|
{
|
|||
|
if (_slotArray[i] == realData.HitInfo.HitSlot)
|
|||
|
{
|
|||
|
_slotSelectIndex = i;
|
|||
|
}
|
|||
|
|
|||
|
if (_slotArray[i] == realData.UserSlot)
|
|||
|
{
|
|||
|
_slotSelectIndex2 = i;
|
|||
|
}
|
|||
|
if (_slotArray[i] == realData.TargetSlot)
|
|||
|
{
|
|||
|
_slotSelectIndex3 = i;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
// GUI
|
|||
|
void OnGUI()
|
|||
|
{
|
|||
|
//编辑事件点
|
|||
|
OnEventGUI(EventInfo);
|
|||
|
}
|
|||
|
|
|||
|
void OnEventGUI(SkillBaseEventInfo data)
|
|||
|
{
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
data.IsEnable = EditorGUILayout.Toggle(data.IsEnable, GUILayout.Width(20));
|
|||
|
GUI.color = Color.green;
|
|||
|
GUILayout.Label(data.ShowName, GUILayout.Width(100));
|
|||
|
GUI.color = Color.white;
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("当前帧", GUILayout.Width(50));
|
|||
|
GUILayout.Label(data.EventFrame.ToString(), GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
switch (data.EventType)
|
|||
|
{
|
|||
|
#region//PlayAnimation
|
|||
|
case SkillEventDefine.PlayAnimation:
|
|||
|
{
|
|||
|
var realData = data as PlayAnimEventInfo;
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("动作名字", GUILayout.Width(80));
|
|||
|
realData.AnimName = EditorGUILayout.TextField(realData.AnimName, GUILayout.Width(100));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("是否循环", GUILayout.Width(60));
|
|||
|
realData.Loop = EditorGUILayout.Toggle(realData.Loop != 0) ? 1 : 0;
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("播放速度", GUILayout.Width(60));
|
|||
|
realData.Speed = EditorGUILayout.FloatField(realData.Speed, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("开始时间(0-1)", GUILayout.Width(90));
|
|||
|
realData.NormalizedTime = EditorGUILayout.Slider(realData.NormalizedTime, 0f, 1f, GUILayout.Width(150));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
}
|
|||
|
break;
|
|||
|
#endregion
|
|||
|
#region//PlayVfx
|
|||
|
case SkillEventDefine.PlayVfx:
|
|||
|
{
|
|||
|
var realData = data as PlayVfxEventInfo;
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("特效ID", GUILayout.Width(50));
|
|||
|
realData.VfxID = EditorGUILayout.IntField(realData.VfxID, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("插槽", GUILayout.Width(50));
|
|||
|
var newSlotIndex = EditorGUILayout.Popup(_slotSelectIndex, _slotArray, GUILayout.Width(200));
|
|||
|
if (newSlotIndex != _slotSelectIndex || string.IsNullOrEmpty(realData.SlotName))
|
|||
|
{
|
|||
|
_slotSelectIndex = newSlotIndex;
|
|||
|
realData.SlotName = _slotArray[_slotSelectIndex];
|
|||
|
}
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("缩放", GUILayout.Width(50));
|
|||
|
realData.Scale = EditorGUILayout.FloatField(realData.Scale, GUILayout.Width(200));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("同步位置", GUILayout.Width(60));
|
|||
|
realData.SyncPos = EditorGUILayout.Toggle(realData.SyncPos != 0, GUILayout.Width(40)) ? 1 : 0;
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("同步旋转", GUILayout.Width(60));
|
|||
|
realData.SyncRot = EditorGUILayout.Toggle(realData.SyncRot != 0, GUILayout.Width(40)) ? 1 : 0;
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("同步缩放", GUILayout.Width(60));
|
|||
|
realData.SyncScale = EditorGUILayout.Toggle(realData.SyncScale != 0, GUILayout.Width(40)) ? 1 : 0;
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("同步帧数帧数", GUILayout.Width(60));
|
|||
|
realData.SyncFrameCount = EditorGUILayout.IntField(realData.SyncFrameCount, GUILayout.Width(40));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
}
|
|||
|
break;
|
|||
|
#endregion
|
|||
|
#region//PlaySfx
|
|||
|
case SkillEventDefine.PlaySfx:
|
|||
|
{
|
|||
|
var realData = data as PlaySfxEventInfo;
|
|||
|
|
|||
|
EditorGUILayout.BeginVertical();
|
|||
|
GUILayout.Label("音效名字", GUILayout.Width(50));
|
|||
|
realData.Sound = EditorGUILayout.TextField(realData.Sound, GUILayout.Width(200));
|
|||
|
|
|||
|
GUILayout.Label("Pitch", GUILayout.Width(50));
|
|||
|
realData.Pitch = EditorGUILayout.FloatField(realData.Pitch, GUILayout.Width(200));
|
|||
|
|
|||
|
GUILayout.Label("音量", GUILayout.Width(50));
|
|||
|
realData.Volume = EditorGUILayout.Slider(realData.Volume, 0f, 1f, GUILayout.Width(150));
|
|||
|
EditorGUILayout.EndVertical();
|
|||
|
}
|
|||
|
break;
|
|||
|
#endregion
|
|||
|
#region//PlayCameraShake
|
|||
|
case SkillEventDefine.PlayCameraShake:
|
|||
|
{
|
|||
|
var realData = data as PlayCameraShakeEventInfo;
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("震动类型", GUILayout.Width(50));
|
|||
|
realData.CurveType = (VFXCameraShakerType)EditorGUILayout.Popup((int)realData.CurveType, CameraShakeNames, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("震动力度", GUILayout.Width(50));
|
|||
|
realData.CurvePower = EditorGUILayout.FloatField(realData.CurvePower, GUILayout.Width(100));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("震动时间", GUILayout.Width(50));
|
|||
|
realData.CurveTotalTime = EditorGUILayout.FloatField(realData.CurveTotalTime, GUILayout.Width(100));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
GUILayout.Label("震动曲线", GUILayout.Width(50));
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
realData.Curve = EditorGUILayout.CurveField(realData.Curve, GUILayout.Width(80), GUILayout.Height(40));
|
|||
|
if (GUILayout.Button("重置曲线", GUILayout.Width(80), GUILayout.Height(40)))
|
|||
|
{
|
|||
|
realData.ResetCurve();
|
|||
|
}
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
}
|
|||
|
break;
|
|||
|
#endregion
|
|||
|
#region//PlayBlur
|
|||
|
case SkillEventDefine.PlayBlur:
|
|||
|
{
|
|||
|
var realData = data as PlayBlurEventInfo;
|
|||
|
|
|||
|
EditorGUILayout.BeginVertical();
|
|||
|
|
|||
|
realData.BlurType = EditorGUILayout.Popup(realData.BlurType, CameraBlurNames, GUILayout.Width(100));
|
|||
|
switch (realData.BlurType)
|
|||
|
{
|
|||
|
case 0:
|
|||
|
GUILayout.Label("开始值", GUILayout.Width(100));
|
|||
|
realData.Start = EditorGUILayout.FloatField(realData.Start, GUILayout.Width(100));
|
|||
|
|
|||
|
GUILayout.Label("结束值", GUILayout.Width(100));
|
|||
|
realData.End = EditorGUILayout.FloatField(realData.End, GUILayout.Width(100));
|
|||
|
|
|||
|
GUILayout.Label("持续时间", GUILayout.Width(50));
|
|||
|
realData.Time = EditorGUILayout.FloatField(realData.Time, GUILayout.Width(100));
|
|||
|
break;
|
|||
|
case 1:
|
|||
|
GUILayout.Label("模糊大小", GUILayout.Width(100));
|
|||
|
realData.GrassBlurSize = EditorGUILayout.FloatField(realData.GrassBlurSize, GUILayout.Width(100));
|
|||
|
GUILayout.Label("持续时间", GUILayout.Width(100));
|
|||
|
realData.Time = EditorGUILayout.FloatField(realData.Time, GUILayout.Width(100));
|
|||
|
break;
|
|||
|
}
|
|||
|
EditorGUILayout.EndVertical();
|
|||
|
}
|
|||
|
break;
|
|||
|
#endregion
|
|||
|
#region//PlaySlow
|
|||
|
case SkillEventDefine.PlaySlow:
|
|||
|
{
|
|||
|
var realData = data as PlaySlowEventInfo;
|
|||
|
|
|||
|
EditorGUILayout.BeginVertical();
|
|||
|
GUILayout.Label("时间缩放", GUILayout.Width(50));
|
|||
|
realData.TimeScale = EditorGUILayout.Slider(realData.TimeScale, 0.1f, 1f, GUILayout.Width(150));
|
|||
|
|
|||
|
GUILayout.Label("持续时间", GUILayout.Width(50));
|
|||
|
realData.Time = EditorGUILayout.FloatField(realData.Time, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndVertical();
|
|||
|
}
|
|||
|
break;
|
|||
|
#endregion
|
|||
|
|
|||
|
#region//DisableMove
|
|||
|
case SkillEventDefine.DisableMove:
|
|||
|
{
|
|||
|
var realData = data as DisableMoveEventInfo;
|
|||
|
EditorGUILayout.BeginVertical();
|
|||
|
GUILayout.Label("禁止帧数,为0表示禁止到技能结束", GUILayout.Width(200));
|
|||
|
realData.DisableFrameCount = EditorGUILayout.IntField(realData.DisableFrameCount, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndVertical();
|
|||
|
}
|
|||
|
break;
|
|||
|
#endregion
|
|||
|
#region//DisableChangeDir
|
|||
|
case SkillEventDefine.DisableChangeDir:
|
|||
|
{
|
|||
|
var realData = data as DisableChangeDirEventInfo;
|
|||
|
EditorGUILayout.BeginVertical();
|
|||
|
GUILayout.Label("禁止帧数,为0表示禁止到技能结束", GUILayout.Width(200));
|
|||
|
realData.DisableFrameCount = EditorGUILayout.IntField(realData.DisableFrameCount, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndVertical();
|
|||
|
}
|
|||
|
break;
|
|||
|
#endregion
|
|||
|
#region//PlayLockTrajectory
|
|||
|
case SkillEventDefine.PlayLockTrajectory:
|
|||
|
{
|
|||
|
var realData = data as PlayLockTrajectoryEventInfo;
|
|||
|
EditorGUILayout.BeginVertical();
|
|||
|
OnFindTargetInfoGUI(realData.FindInfo);
|
|||
|
EditorGUILayout.EndVertical();
|
|||
|
GUILayout.Space(10);
|
|||
|
OnHitEffectGUI(realData.HitInfo);
|
|||
|
GUILayout.Space(10);
|
|||
|
|
|||
|
GUI.color = Color.green;
|
|||
|
GUILayout.Label("飞行特效配置", GUILayout.Width(100));
|
|||
|
GUI.color = Color.white;
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("特效开始位置插槽", GUILayout.Width(100));
|
|||
|
var newSlotIndex = EditorGUILayout.Popup(_slotSelectIndex2, _slotArray, GUILayout.Width(200));
|
|||
|
if (newSlotIndex != _slotSelectIndex2 || string.IsNullOrEmpty(realData.StartSlot))
|
|||
|
{
|
|||
|
_slotSelectIndex2 = newSlotIndex;
|
|||
|
realData.StartSlot = _slotArray[_slotSelectIndex2];
|
|||
|
}
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("特效ID", GUILayout.Width(150));
|
|||
|
realData.VfxID = EditorGUILayout.IntField(realData.VfxID, GUILayout.Width(50));
|
|||
|
|
|||
|
GUILayout.Label("特效半径", GUILayout.Width(150));
|
|||
|
realData.VfxRadius = EditorGUILayout.FloatField(realData.VfxRadius, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("特效飞行起始速度", GUILayout.Width(100));
|
|||
|
realData.FlySpeed = EditorGUILayout.FloatField(realData.FlySpeed, GUILayout.Width(50));
|
|||
|
GUILayout.Label("特效飞行加速度", GUILayout.Width(100));
|
|||
|
realData.FlyAddSpeed = EditorGUILayout.FloatField(realData.FlyAddSpeed, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
realData.CanHitRepeatTarget = GUILayout.Toggle(realData.CanHitRepeatTarget != 0, "是否可以命中重复目标", GUILayout.Width(200)) ? 1 : 0;
|
|||
|
}
|
|||
|
break;
|
|||
|
#endregion
|
|||
|
#region//PlaySimpleSkillObject
|
|||
|
case SkillEventDefine.PlaySimpleSkillObject:
|
|||
|
{
|
|||
|
var realData = data as PlaySimpleSkillObjectEventInfo;
|
|||
|
EditorGUILayout.BeginVertical();
|
|||
|
OnFindTargetInfoGUI(realData.FindInfo);
|
|||
|
EditorGUILayout.EndVertical();
|
|||
|
GUILayout.Space(10);
|
|||
|
OnHitEffectGUI(realData.HitInfo);
|
|||
|
GUILayout.Space(10);
|
|||
|
|
|||
|
GUI.color = Color.green;
|
|||
|
GUILayout.Label("召唤物配置", GUILayout.Width(100));
|
|||
|
GUI.color = Color.white;
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("出现位置", GUILayout.Width(80));
|
|||
|
realData.PosType = EditorGUILayout.Popup(realData.PosType, PosTypeNames, GUILayout.Width(80));
|
|||
|
if (realData.PosType != 0)
|
|||
|
{
|
|||
|
GUILayout.Label("离主角最大距离", GUILayout.Width(80));
|
|||
|
realData.MaxDis = EditorGUILayout.FloatField(realData.MaxDis, GUILayout.Width(80));
|
|||
|
}
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("特效ID", GUILayout.Width(80));
|
|||
|
realData.VfxID = EditorGUILayout.IntField(realData.VfxID, GUILayout.Width(50));
|
|||
|
|
|||
|
GUILayout.Label("生存帧数", GUILayout.Width(80));
|
|||
|
realData.LifeFrame = EditorGUILayout.IntField(realData.LifeFrame, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("开始伤害帧数", GUILayout.Width(80));
|
|||
|
realData.StartHitFrame = EditorGUILayout.IntField(realData.StartHitFrame, GUILayout.Width(50));
|
|||
|
|
|||
|
GUILayout.Label("产生伤害次数", GUILayout.Width(80));
|
|||
|
realData.HitCount = EditorGUILayout.IntField(realData.HitCount, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("伤害间隔帧数", GUILayout.Width(80));
|
|||
|
realData.HitInterval = EditorGUILayout.IntField(realData.HitInterval, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
}
|
|||
|
break;
|
|||
|
#endregion
|
|||
|
#region//PlaySkillObject
|
|||
|
case SkillEventDefine.PlaySkillObject:
|
|||
|
{
|
|||
|
var realData = data as PlaySkillObjectEventInfo;
|
|||
|
GUILayout.Label("召唤对象配置名", GUILayout.Width(200));
|
|||
|
realData.SkillName = EditorGUILayout.TextField(realData.SkillName, GUILayout.Width(200));
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("出现位置", GUILayout.Width(80));
|
|||
|
realData.PosType = EditorGUILayout.Popup(realData.PosType, PosTypeNames, GUILayout.Width(80));
|
|||
|
if (realData.PosType != 0)
|
|||
|
{
|
|||
|
GUILayout.Label("离主角最大距离", GUILayout.Width(80));
|
|||
|
realData.MaxDis = EditorGUILayout.FloatField(realData.MaxDis, GUILayout.Width(80));
|
|||
|
}
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("移动方式", GUILayout.Width(80));
|
|||
|
realData.MoveType = (SkillObjMoveType)EditorGUILayout.Popup((int)realData.MoveType, SkillObjMoveNames, GUILayout.Width(100));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
if (realData.MoveType == SkillObjMoveType.FixDirMove || realData.MoveType == SkillObjMoveType.LockMove)
|
|||
|
{
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("移动速度", GUILayout.Width(80));
|
|||
|
realData.MoveSpeed = EditorGUILayout.FloatField(realData.MoveSpeed, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("移动加速度", GUILayout.Width(80));
|
|||
|
realData.MoveAddSpeed = EditorGUILayout.FloatField(realData.MoveAddSpeed, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
}
|
|||
|
if (realData.MoveType == SkillObjMoveType.FixDirMove)
|
|||
|
{
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("偏移角度", GUILayout.Width(80));
|
|||
|
realData.FixDirOffsetAngle = EditorGUILayout.FloatField(realData.FixDirOffsetAngle, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
}
|
|||
|
}
|
|||
|
break;
|
|||
|
#endregion
|
|||
|
#region//PlayHit
|
|||
|
case SkillEventDefine.PlayHit:
|
|||
|
{
|
|||
|
var realData = data as PlayHitEventInfo;
|
|||
|
EditorGUILayout.BeginVertical();
|
|||
|
OnFindTargetInfoGUI(realData.FindInfo);
|
|||
|
EditorGUILayout.EndVertical();
|
|||
|
GUILayout.Space(10);
|
|||
|
OnHitEffectGUI(realData.HitInfo);
|
|||
|
GUILayout.Space(10);
|
|||
|
}
|
|||
|
break;
|
|||
|
#endregion
|
|||
|
#region//PlaySelfMove
|
|||
|
case SkillEventDefine.PlaySelfMove:
|
|||
|
{
|
|||
|
var realData = data as PlaySelfMoveEventInfo;
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("移动类型", GUILayout.Width(80));
|
|||
|
realData.MoveType = (SelfMoveType)EditorGUILayout.Popup((int)realData.MoveType, SelfMoveTypeNames, GUILayout.Width(80));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("最大移动距离", GUILayout.Width(80));
|
|||
|
realData.MaxDis = EditorGUILayout.FloatField(realData.MaxDis, GUILayout.Width(80));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("移动时间", GUILayout.Width(80));
|
|||
|
realData.MoveTime = EditorGUILayout.FloatField(realData.MoveTime, GUILayout.Width(80));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("无目标时移动距离", GUILayout.Width(80));
|
|||
|
realData.NoTargetDis = EditorGUILayout.FloatField(realData.NoTargetDis, GUILayout.Width(80));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("移动曲线", GUILayout.Width(80), GUILayout.Height(30));
|
|||
|
realData.MoveCurve = EditorGUILayout.CurveField(realData.MoveCurve, GUILayout.Width(80), GUILayout.Height(30));
|
|||
|
if (GUILayout.Button("重置", GUILayout.Width(50), GUILayout.Height(30)))
|
|||
|
{
|
|||
|
realData.ResetMoveCurve();
|
|||
|
}
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
}
|
|||
|
break;
|
|||
|
#endregion
|
|||
|
#region//PlayHideWeapon
|
|||
|
case SkillEventDefine.PlayHideWeapon:
|
|||
|
{
|
|||
|
var realData = data as PlayHideWeaponEventInfo;
|
|||
|
EditorGUILayout.BeginVertical();
|
|||
|
GUILayout.Label("隐藏帧数,为0表示隐藏到技能结束", GUILayout.Width(200));
|
|||
|
realData.HideFrame = EditorGUILayout.IntField(realData.HideFrame, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndVertical();
|
|||
|
}
|
|||
|
break;
|
|||
|
#endregion
|
|||
|
#region//PlayLinkDamage
|
|||
|
case SkillEventDefine.PlayLinkDamage:
|
|||
|
{
|
|||
|
var realData = data as PlayLinkDamageEventInfo;
|
|||
|
EditorGUILayout.BeginVertical();
|
|||
|
OnFindTargetInfoGUI(realData.FindInfo);
|
|||
|
GUILayout.Space(10);
|
|||
|
OnHitEffectGUI(realData.HitInfo);
|
|||
|
GUILayout.Space(10);
|
|||
|
|
|||
|
GUI.color = Color.green;
|
|||
|
GUILayout.Label("链接效果配置", GUILayout.Width(100));
|
|||
|
GUI.color = Color.white;
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("生存帧数", GUILayout.Width(80));
|
|||
|
realData.LifeFrameCount = EditorGUILayout.IntField(realData.LifeFrameCount, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("开始伤害帧数", GUILayout.Width(80));
|
|||
|
realData.StartHitFrame = EditorGUILayout.IntField(realData.StartHitFrame, GUILayout.Width(50));
|
|||
|
|
|||
|
GUILayout.Label("产生伤害次数", GUILayout.Width(80));
|
|||
|
realData.HitCount = EditorGUILayout.IntField(realData.HitCount, GUILayout.Width(50));
|
|||
|
|
|||
|
GUILayout.Label("伤害间隔帧数", GUILayout.Width(80));
|
|||
|
realData.HitInterval = EditorGUILayout.IntField(realData.HitInterval, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("开始位置", GUILayout.Width(50));
|
|||
|
realData.StartPosType = EditorGUILayout.Popup(realData.StartPosType, LinkStartPosType, GUILayout.Width(100));
|
|||
|
|
|||
|
GUILayout.Label("链接类型", GUILayout.Width(50));
|
|||
|
realData.LinkType = EditorGUILayout.Popup(realData.LinkType, LinkDamageType, GUILayout.Width(100));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("主特效ID", GUILayout.Width(60));
|
|||
|
realData.VfxID = EditorGUILayout.IntField(realData.VfxID, GUILayout.Width(50));
|
|||
|
|
|||
|
GUILayout.Label("开始点特效", GUILayout.Width(60));
|
|||
|
realData.StartVfxID = EditorGUILayout.IntField(realData.StartVfxID, GUILayout.Width(50));
|
|||
|
GUILayout.Label("目标点特效", GUILayout.Width(60));
|
|||
|
realData.TargetVfxID = EditorGUILayout.IntField(realData.TargetVfxID, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("特效开始插槽", GUILayout.Width(80));
|
|||
|
var newSlotIndex = EditorGUILayout.Popup(_slotSelectIndex2, _slotArray, GUILayout.Width(100));
|
|||
|
if (newSlotIndex != _slotSelectIndex2 || string.IsNullOrEmpty(realData.UserSlot))
|
|||
|
{
|
|||
|
_slotSelectIndex2 = newSlotIndex;
|
|||
|
realData.UserSlot = _slotArray[_slotSelectIndex2];
|
|||
|
}
|
|||
|
|
|||
|
GUILayout.Label("特效目标插槽", GUILayout.Width(80));
|
|||
|
newSlotIndex = EditorGUILayout.Popup(_slotSelectIndex3, _slotArray, GUILayout.Width(100));
|
|||
|
if (newSlotIndex != _slotSelectIndex3 || string.IsNullOrEmpty(realData.TargetSlot))
|
|||
|
{
|
|||
|
_slotSelectIndex3 = newSlotIndex;
|
|||
|
realData.TargetSlot = _slotArray[_slotSelectIndex3];
|
|||
|
}
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.EndVertical();
|
|||
|
}
|
|||
|
break;
|
|||
|
#endregion
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private void OnFindTargetInfoGUI(FindTargetInfo realData)
|
|||
|
{
|
|||
|
GUI.color = Color.green;
|
|||
|
GUILayout.Label("查找目标数据");
|
|||
|
GUI.color = Color.white;
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("技能范围", GUILayout.Width(50));
|
|||
|
realData.AreaType = (SkillTargetArea)EditorGUILayout.Popup((int)realData.AreaType, SkillAreaNames, GUILayout.Width(50));
|
|||
|
switch (realData.AreaType)
|
|||
|
{
|
|||
|
case SkillTargetArea.Rectangle:
|
|||
|
{
|
|||
|
GUILayout.Label("矩形宽", GUILayout.Width(40));
|
|||
|
realData.RectWidth = EditorGUILayout.FloatField(realData.RectWidth, GUILayout.Width(50));
|
|||
|
GUILayout.Label("矩形高", GUILayout.Width(40));
|
|||
|
realData.RectHeight = EditorGUILayout.FloatField(realData.RectHeight, GUILayout.Width(50));
|
|||
|
}
|
|||
|
break;
|
|||
|
case SkillTargetArea.FanShaped:
|
|||
|
{
|
|||
|
GUILayout.Label("扇形角度", GUILayout.Width(50));
|
|||
|
realData.SectorAngle = EditorGUILayout.FloatField(realData.SectorAngle, GUILayout.Width(50));
|
|||
|
GUILayout.Label("扇形半径", GUILayout.Width(50));
|
|||
|
realData.SectorRadius = EditorGUILayout.FloatField(realData.SectorRadius, GUILayout.Width(50));
|
|||
|
}
|
|||
|
break;
|
|||
|
case SkillTargetArea.Round:
|
|||
|
{
|
|||
|
GUILayout.Label("圆形半径", GUILayout.Width(50));
|
|||
|
realData.RoundRadius = EditorGUILayout.FloatField(realData.RoundRadius, GUILayout.Width(50));
|
|||
|
}
|
|||
|
break;
|
|||
|
}
|
|||
|
GUILayout.Label("开始距离", GUILayout.Width(50));
|
|||
|
realData.StartDis = EditorGUILayout.FloatField(realData.StartDis, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("最大可攻击目标数量", GUILayout.Width(110));
|
|||
|
realData.MaxTargetCount = EditorGUILayout.IntField(realData.MaxTargetCount, GUILayout.Width(50));
|
|||
|
realData.ShowWarningField = GUILayout.Toggle(realData.ShowWarningField, "是否显示警示圈", GUILayout.Width(100));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
}
|
|||
|
private void OnHitEffectGUI(HitEffectInfo realData)
|
|||
|
{
|
|||
|
GUI.color = Color.green;
|
|||
|
GUILayout.Label("受击效果数据");
|
|||
|
GUI.color = Color.white;
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("时间变化曲线", GUILayout.Width(80), GUILayout.Height(30));
|
|||
|
realData.HitTimeCurve = EditorGUILayout.CurveField(realData.HitTimeCurve, GUILayout.Width(80), GUILayout.Height(30));
|
|||
|
if (GUILayout.Button("重置", GUILayout.Width(50), GUILayout.Height(30)))
|
|||
|
{
|
|||
|
realData.ResetHitTimeCurve();
|
|||
|
}
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
GUILayout.Space(10);
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("受击特效", GUILayout.Width(50));
|
|||
|
realData.HitVfx = EditorGUILayout.IntField(realData.HitVfx, GUILayout.Width(40));
|
|||
|
|
|||
|
GUILayout.Label("受击特效插槽", GUILayout.Width(70));
|
|||
|
var newSlotIndex = EditorGUILayout.Popup(_slotSelectIndex, _slotArray, GUILayout.Width(100));
|
|||
|
if (newSlotIndex != _slotSelectIndex || string.IsNullOrEmpty(realData.HitSlot))
|
|||
|
{
|
|||
|
_slotSelectIndex = newSlotIndex;
|
|||
|
realData.HitSlot = _slotArray[_slotSelectIndex];
|
|||
|
}
|
|||
|
GUILayout.Label("特效缩放", GUILayout.Width(50));
|
|||
|
realData.HitVfxScale = EditorGUILayout.FloatField(realData.HitVfxScale, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("受击动作", GUILayout.Width(50));
|
|||
|
realData.HitAnim = EditorGUILayout.TextField(realData.HitAnim, GUILayout.Width(80));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("特殊参数", GUILayout.Width(50));
|
|||
|
realData.Params = EditorGUILayout.TextField(realData.Params, GUILayout.Width(80));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
GUILayout.Space(10);
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("闪烁时间", GUILayout.Width(50));
|
|||
|
realData.BlinkTime = EditorGUILayout.FloatField(realData.BlinkTime, GUILayout.Width(50));
|
|||
|
GUILayout.Label("闪烁强度", GUILayout.Width(50));
|
|||
|
realData.BlinkPower = EditorGUILayout.FloatField(realData.BlinkPower, GUILayout.Width(50));
|
|||
|
GUILayout.Label("闪烁颜色", GUILayout.Width(50));
|
|||
|
realData.BlinkColor = EditorGUILayout.ColorField(realData.BlinkColor, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("闪烁曲线", GUILayout.Width(50));
|
|||
|
realData.BlinkCurve = EditorGUILayout.CurveField(realData.BlinkCurve, GUILayout.Width(80), GUILayout.Height(30));
|
|||
|
if (GUILayout.Button("重置", GUILayout.Width(50), GUILayout.Height(30)))
|
|||
|
{
|
|||
|
realData.ResetBlinkCurve();
|
|||
|
}
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
GUILayout.Space(10);
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("攻击效果", GUILayout.Width(50));
|
|||
|
realData.HitType = (SkillHitType)EditorGUILayout.Popup((int)realData.HitType, new String[] { "无", "受击僵直", "击退", "击飞", "抓取" }, GUILayout.Width(80));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
bool showHitFly = false;
|
|||
|
switch (realData.HitType)
|
|||
|
{
|
|||
|
case SkillHitType.HitStiff:
|
|||
|
{
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("僵直时间", GUILayout.Width(50));
|
|||
|
realData.HitEffectTime = EditorGUILayout.FloatField(realData.HitEffectTime, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
GUILayout.Space(10);
|
|||
|
GUI.color = Color.green;
|
|||
|
GUILayout.Label("追击击飞", GUILayout.Width(50));
|
|||
|
GUI.color = Color.white;
|
|||
|
GUILayout.Label("击飞方向类型", GUILayout.Width(70));
|
|||
|
realData.HitDirType = (SkillHitDirType)EditorGUILayout.Popup((int)realData.HitDirType, new String[] { "真实方向", "同方向" }, GUILayout.Width(80));
|
|||
|
showHitFly = true;
|
|||
|
}
|
|||
|
break;
|
|||
|
case SkillHitType.HitBack:
|
|||
|
{
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("击退方向类型", GUILayout.Width(70));
|
|||
|
realData.HitDirType = (SkillHitDirType)EditorGUILayout.Popup((int)realData.HitDirType, new String[] { "真实方向", "同方向" }, GUILayout.Width(80));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("击退距离", GUILayout.Width(50));
|
|||
|
realData.BackDis = EditorGUILayout.FloatField(realData.BackDis, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("击退时间", GUILayout.Width(50));
|
|||
|
realData.HitEffectTime = EditorGUILayout.FloatField(realData.HitEffectTime, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
GUILayout.Space(10);
|
|||
|
GUI.color = Color.green;
|
|||
|
GUILayout.Label("追击击飞", GUILayout.Width(50));
|
|||
|
GUI.color = Color.white;
|
|||
|
showHitFly = true;
|
|||
|
}
|
|||
|
break;
|
|||
|
case SkillHitType.HitFly:
|
|||
|
{
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("击飞方向类型", GUILayout.Width(70));
|
|||
|
realData.HitDirType = (SkillHitDirType)EditorGUILayout.Popup((int)realData.HitDirType, new String[] { "真实方向", "同方向" }, GUILayout.Width(80));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
showHitFly = true;
|
|||
|
}
|
|||
|
break;
|
|||
|
case SkillHitType.HitGrab:
|
|||
|
{
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("抓取点的位置", GUILayout.Width(80));
|
|||
|
realData.GrabPos = EditorGUILayout.FloatField(realData.GrabPos, GUILayout.Width(50));
|
|||
|
GUILayout.Label("抓取结果距离", GUILayout.Width(80));
|
|||
|
realData.GrabDis = EditorGUILayout.FloatField(realData.GrabDis, GUILayout.Width(50));
|
|||
|
GUILayout.Label("抓取时间", GUILayout.Width(50));
|
|||
|
realData.HitEffectTime = EditorGUILayout.FloatField(realData.HitEffectTime, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
}
|
|||
|
break;
|
|||
|
}
|
|||
|
|
|||
|
if (showHitFly)
|
|||
|
{
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("击飞距离", GUILayout.Width(50));
|
|||
|
realData.FlyDis = EditorGUILayout.FloatField(realData.FlyDis, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("高度变化曲线", GUILayout.Width(80), GUILayout.Height(30));
|
|||
|
realData.HitFlyHeightCurve = EditorGUILayout.CurveField(realData.HitFlyHeightCurve, GUILayout.Width(80), GUILayout.Height(30));
|
|||
|
if (GUILayout.Button("重置", GUILayout.Width(50), GUILayout.Height(30)))
|
|||
|
{
|
|||
|
realData.ResetFlyHeightCurve();
|
|||
|
}
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
|
|||
|
EditorGUILayout.BeginHorizontal();
|
|||
|
GUILayout.Label("击飞时间", GUILayout.Width(50));
|
|||
|
realData.FlyTime = EditorGUILayout.FloatField(realData.FlyTime, GUILayout.Width(50));
|
|||
|
GUILayout.Label("倒地时间", GUILayout.Width(50));
|
|||
|
realData.LieTime = EditorGUILayout.FloatField(realData.LieTime, GUILayout.Width(50));
|
|||
|
EditorGUILayout.EndHorizontal();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public void OnDestroy()
|
|||
|
{
|
|||
|
EventInfo = null;
|
|||
|
IsOpen = false;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|