chore: initial commit
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using UnityEditor;
|
||||
|
||||
#if MM_UI
|
||||
namespace MoreMountains.Tools
|
||||
{
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(MMHealthBar),true)]
|
||||
/// <summary>
|
||||
/// Custom editor for health bars (mostly a switch for prefab based / drawn bars
|
||||
/// </summary>
|
||||
public class HealthBarEditor : Editor
|
||||
{
|
||||
public MMHealthBar HealthBarTarget
|
||||
{
|
||||
get
|
||||
{
|
||||
return (MMHealthBar)target;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
serializedObject.Update();
|
||||
|
||||
switch (HealthBarTarget.HealthBarType)
|
||||
{
|
||||
case MMHealthBar.HealthBarTypes.Prefab:
|
||||
Editor.DrawPropertiesExcluding(serializedObject, new string[] {"TargetProgressBar", "NestDrawnHealthBar", "Billboard", "FollowTargetMode", "Size","BackgroundPadding", "SortingLayerName", "InitialRotationAngles", "ForegroundColor", "DelayedColor", "BorderColor", "BackgroundColor", "Delay", "LerpFrontBar", "LerpFrontBarSpeed", "LerpDelayedBar", "LerpDelayedBarSpeed", "BumpScaleOnChange", "BumpDuration", "BumpAnimationCurve" });
|
||||
break;
|
||||
case MMHealthBar.HealthBarTypes.Drawn:
|
||||
Editor.DrawPropertiesExcluding(serializedObject, new string[] {"TargetProgressBar", "HealthBarPrefab" });
|
||||
break;
|
||||
case MMHealthBar.HealthBarTypes.Existing:
|
||||
Editor.DrawPropertiesExcluding(serializedObject, new string[] {"HealthBarPrefab", "NestDrawnHealthBar", "Billboard", "FollowTargetMode", "Size","BackgroundPadding", "SortingLayerName", "InitialRotationAngles", "ForegroundColor", "DelayedColor", "BorderColor", "BackgroundColor", "Delay", "LerpFrontBar", "LerpFrontBarSpeed", "LerpDelayedBar", "LerpDelayedBarSpeed", "BumpScaleOnChange", "BumpDuration", "BumpAnimationCurve" });
|
||||
break;
|
||||
}
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0cb989d69836540e780467ed8454742c
|
||||
timeCreated: 1470860033
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user