增加AnimationAddition动画支持

This commit is contained in:
monitor1394
2023-07-11 13:32:50 +08:00
parent 0adc9e71e5
commit f678477c88
39 changed files with 704 additions and 432 deletions

View File

@@ -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;
}
}