mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-23 09:20:08 +00:00
增加Animation的Addition动画支持
This commit is contained in:
@@ -13,7 +13,6 @@ namespace XCharts.Editor
|
||||
if (MakeComponentFoldout(prop, "m_Enable", true))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
//PropertyField(prop, "m_Type");
|
||||
PropertyField(prop, "m_Delay");
|
||||
PropertyField(prop, "m_Duration");
|
||||
--EditorGUI.indentLevel;
|
||||
@@ -21,6 +20,36 @@ namespace XCharts.Editor
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(XCharts.Runtime.AnimationChange), true)]
|
||||
public class AnimationChangeDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeComponentFoldout(prop, "m_Enable", true))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Duration");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(XCharts.Runtime.AnimationAddition), true)]
|
||||
public class AnimationAdditionDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeComponentFoldout(prop, "m_Enable", true))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Duration");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(AnimationStyle), true)]
|
||||
public class AnimationDrawer : BasePropertyDrawer
|
||||
{
|
||||
@@ -33,10 +62,10 @@ namespace XCharts.Editor
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Type");
|
||||
PropertyField(prop, "m_UnscaledTime");
|
||||
PropertyField(prop, "m_FadeIn");
|
||||
PropertyField(prop, "m_FadeOut");
|
||||
PropertyField(prop, "m_Updated");
|
||||
PropertyField(prop, "m_Added");
|
||||
PropertyField(prop, "m_Fadein");
|
||||
PropertyField(prop, "m_Fadeout");
|
||||
PropertyField(prop, "m_Change");
|
||||
PropertyField(prop, "m_Addition");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user