From fc4bd708fd368e1435eb6ba6fd6f076f301d6fb3 Mon Sep 17 00:00:00 2001 From: mob-sakai Date: Mon, 16 Nov 2020 03:07:35 +0900 Subject: [PATCH] refactor: refactor --- Scripts/Editor/UIParticleEditor.cs | 6 +++--- Scripts/UIParticle.cs | 3 +-- Scripts/Utils.cs | 6 +++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Scripts/Editor/UIParticleEditor.cs b/Scripts/Editor/UIParticleEditor.cs index 62cd226..76482c2 100644 --- a/Scripts/Editor/UIParticleEditor.cs +++ b/Scripts/Editor/UIParticleEditor.cs @@ -89,11 +89,11 @@ namespace Coffee.UIExtensions { EditorGUI.LabelField(new Rect(rect.x, rect.y, 150, rect.height), s_ContentRenderingOrder); - #if UNITY_2019_3_OR_NEWER +#if UNITY_2019_3_OR_NEWER rect = new Rect(rect.width - 55, rect.y, 80, rect.height); - #else +#else rect = new Rect(rect.width - 55, rect.y - 1, 80, rect.height); - #endif +#endif if (GUI.Button(rect, s_ContentRefresh, EditorStyles.miniButton)) { diff --git a/Scripts/UIParticle.cs b/Scripts/UIParticle.cs index 1e10b0d..004b416 100755 --- a/Scripts/UIParticle.cs +++ b/Scripts/UIParticle.cs @@ -42,8 +42,7 @@ namespace Coffee.UIExtensions private List m_Particles = new List(); #if !SERIALIZE_FIELD_MASKABLE - [SerializeField] - private bool m_Maskable = true; + [SerializeField] private bool m_Maskable = true; #endif private bool _shouldBeRemoved; diff --git a/Scripts/Utils.cs b/Scripts/Utils.cs index e40d429..ebc4278 100644 --- a/Scripts/Utils.cs +++ b/Scripts/Utils.cs @@ -210,10 +210,10 @@ namespace Coffee.UIParticleExtensions // Z position & sortingFudge: descending var aTransform = a.transform; var bTransform = b.transform; - var aPos = tr.InverseTransformPoint(aTransform.position).z+ aRenderer.sortingFudge; - var bPos = tr.InverseTransformPoint(bTransform.position).z+ bRenderer.sortingFudge; + var aPos = tr.InverseTransformPoint(aTransform.position).z + aRenderer.sortingFudge; + var bPos = tr.InverseTransformPoint(bTransform.position).z + bRenderer.sortingFudge; if (!Mathf.Approximately(aPos, bPos)) - return (int)Mathf.Sign(bPos - aPos); + return (int) Mathf.Sign(bPos - aPos); // Material instance ID: match if (aMat.GetInstanceID() == bMat.GetInstanceID())