style: format

release-preview
mob-sakai 2024-09-30 01:12:08 +09:00
parent 1ce4e31a96
commit 6a7f08c056
3 changed files with 20 additions and 16 deletions

View File

@ -17,6 +17,7 @@ using Object = UnityEngine.Object;
#endif #endif
#if UNITY_2021_2_OR_NEWER #if UNITY_2021_2_OR_NEWER
using UnityEditor.SceneManagement; using UnityEditor.SceneManagement;
#elif UNITY_2018_3_OR_NEWER #elif UNITY_2018_3_OR_NEWER
using UnityEditor.Experimental.SceneManagement; using UnityEditor.Experimental.SceneManagement;
#endif #endif

View File

@ -148,7 +148,7 @@ namespace Coffee.UIExtensions
// Collect UIParticle if needed (same size as m_ParticleSystems) // Collect UIParticle if needed (same size as m_ParticleSystems)
CollectUIParticlesIfNeeded(); CollectUIParticlesIfNeeded();
for (var particleIndex = 0; particleIndex < this.m_ParticleSystems.Count; particleIndex++) for (var particleIndex = 0; particleIndex < m_ParticleSystems.Count; particleIndex++)
{ {
var particleSystem = m_ParticleSystems[particleIndex]; var particleSystem = m_ParticleSystems[particleIndex];
@ -163,21 +163,21 @@ namespace Coffee.UIExtensions
particleSystem.GetParticles(particles, count); particleSystem.GetParticles(particles, count);
var uiParticle = _uiParticles[particleIndex]; var uiParticle = _uiParticles[particleIndex];
var dstPos = this.GetDestinationPosition(uiParticle, particleSystem); var dstPos = GetDestinationPosition(uiParticle, particleSystem);
for (var i = 0; i < count; i++) for (var i = 0; i < count; i++)
{ {
// Attracted // Attracted
var p = particles[i]; var p = particles[i];
if (0f < p.remainingLifetime && Vector3.Distance(p.position, dstPos) < this.m_DestinationRadius) if (0f < p.remainingLifetime && Vector3.Distance(p.position, dstPos) < m_DestinationRadius)
{ {
p.remainingLifetime = 0f; p.remainingLifetime = 0f;
particles[i] = p; particles[i] = p;
if (this.m_OnAttracted != null) if (m_OnAttracted != null)
{ {
try try
{ {
this.m_OnAttracted.Invoke(); m_OnAttracted.Invoke();
} }
catch (Exception e) catch (Exception e)
{ {
@ -189,7 +189,7 @@ namespace Coffee.UIExtensions
} }
// Calc attracting time // Calc attracting time
var delayTime = p.startLifetime * this.m_DelayRate; var delayTime = p.startLifetime * m_DelayRate;
var duration = p.startLifetime - delayTime; var duration = p.startLifetime - delayTime;
var time = Mathf.Max(0, p.startLifetime - p.remainingLifetime - delayTime); var time = Mathf.Max(0, p.startLifetime - p.remainingLifetime - delayTime);
@ -197,7 +197,7 @@ namespace Coffee.UIExtensions
if (time <= 0) continue; if (time <= 0) continue;
// Attract // Attract
p.position = this.GetAttractedPosition(p.position, dstPos, duration, time); p.position = GetAttractedPosition(p.position, dstPos, duration, time);
p.velocity *= 0.5f; p.velocity *= 0.5f;
particles[i] = p; particles[i] = p;
} }

View File

@ -40,7 +40,10 @@
Lighting Off Lighting Off
ZWrite Off ZWrite Off
ZTest [unity_GUIZTestMode] ZTest [unity_GUIZTestMode]
Fog { Mode Off } Fog
{
Mode Off
}
Blend One One Blend One One
ColorMask [_ColorMask] ColorMask [_ColorMask]