mirror of
https://github.com/DCFApixels/DragonECS-Unity.git
synced 2025-09-17 17:34:34 +08:00
update
This commit is contained in:
parent
bdc707dc74
commit
a26288a069
@ -34,11 +34,11 @@ namespace DCFApixels.DragonECS
|
|||||||
}
|
}
|
||||||
IEnumerator<T> IEnumerable<T>.GetEnumerator() //IntelliSense hack
|
IEnumerator<T> IEnumerable<T>.GetEnumerator() //IntelliSense hack
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotSupportedException();
|
||||||
}
|
}
|
||||||
IEnumerator IEnumerable.GetEnumerator() //IntelliSense hack
|
IEnumerator IEnumerable.GetEnumerator() //IntelliSense hack
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotSupportedException();
|
||||||
}
|
}
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public static implicit operator T(UnityComponent<T> a) { return a.obj; }
|
public static implicit operator T(UnityComponent<T> a) { return a.obj; }
|
||||||
|
@ -57,34 +57,15 @@ namespace DCFApixels.DragonECS.Unity.Internal
|
|||||||
[MetaID("2DD8BC809201633E2761D5AEF65B7090")]
|
[MetaID("2DD8BC809201633E2761D5AEF65B7090")]
|
||||||
public class EcsLateGizmosRunner : EcsRunner<IEcsGizmosProcess>, IEcsGizmosProcess
|
public class EcsLateGizmosRunner : EcsRunner<IEcsGizmosProcess>, IEcsGizmosProcess
|
||||||
{
|
{
|
||||||
#if DEBUG && !DISABLE_DEBUG
|
private RunHelper _helper;
|
||||||
private EcsProfilerMarker[] _markers;
|
|
||||||
#endif
|
|
||||||
public void DrawGizmos()
|
|
||||||
{
|
|
||||||
#if DEBUG && !DISABLE_DEBUG
|
|
||||||
for (int i = 0; i < Process.Length; i++)
|
|
||||||
{
|
|
||||||
using (_markers[i].Auto())
|
|
||||||
{
|
|
||||||
Process[i].DrawGizmos();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
foreach (var item in Process) item.DrawGizmos();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#if DEBUG && !DISABLE_DEBUG
|
|
||||||
protected override void OnSetup()
|
protected override void OnSetup()
|
||||||
{
|
{
|
||||||
_markers = new EcsProfilerMarker[Process.Length];
|
_helper = new RunHelper(this);
|
||||||
for (int i = 0; i < Process.Length; i++)
|
}
|
||||||
{
|
public void DrawGizmos()
|
||||||
_markers[i] = new EcsProfilerMarker($"{Process[i].GetType().Name}.{nameof(DrawGizmos)}");
|
{
|
||||||
}
|
_helper.Run(p => p.DrawGizmos());
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[MetaColor(MetaColor.DragonRose)]
|
[MetaColor(MetaColor.DragonRose)]
|
||||||
@ -94,34 +75,15 @@ namespace DCFApixels.DragonECS.Unity.Internal
|
|||||||
[MetaID("EDE8BC809201603B47C3A9D1EFD4EE95")]
|
[MetaID("EDE8BC809201603B47C3A9D1EFD4EE95")]
|
||||||
public class EcsLateRunRunner : EcsRunner<IEcsLateRunProcess>, IEcsLateRunProcess
|
public class EcsLateRunRunner : EcsRunner<IEcsLateRunProcess>, IEcsLateRunProcess
|
||||||
{
|
{
|
||||||
#if DEBUG && !DISABLE_DEBUG
|
private RunHelper _helper;
|
||||||
private EcsProfilerMarker[] _markers;
|
|
||||||
#endif
|
|
||||||
public void LateRun()
|
|
||||||
{
|
|
||||||
#if DEBUG && !DISABLE_DEBUG
|
|
||||||
for (int i = 0; i < Process.Length; i++)
|
|
||||||
{
|
|
||||||
using (_markers[i].Auto())
|
|
||||||
{
|
|
||||||
Process[i].LateRun();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
foreach (var item in Process) item.LateRun();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#if DEBUG && !DISABLE_DEBUG
|
|
||||||
protected override void OnSetup()
|
protected override void OnSetup()
|
||||||
{
|
{
|
||||||
_markers = new EcsProfilerMarker[Process.Length];
|
_helper = new RunHelper(this);
|
||||||
for (int i = 0; i < Process.Length; i++)
|
}
|
||||||
{
|
public void LateRun()
|
||||||
_markers[i] = new EcsProfilerMarker($"EcsRunner.{Process[i].GetType().Name}.{nameof(LateRun)}");
|
{
|
||||||
}
|
_helper.Run(p => p.LateRun());
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[MetaColor(MetaColor.DragonRose)]
|
[MetaColor(MetaColor.DragonRose)]
|
||||||
@ -131,33 +93,14 @@ namespace DCFApixels.DragonECS.Unity.Internal
|
|||||||
[MetaID("45F7BC809201866AA05F6DC096A47F01")]
|
[MetaID("45F7BC809201866AA05F6DC096A47F01")]
|
||||||
public class EcsFixedRunRunner : EcsRunner<IEcsFixedRunProcess>, IEcsFixedRunProcess
|
public class EcsFixedRunRunner : EcsRunner<IEcsFixedRunProcess>, IEcsFixedRunProcess
|
||||||
{
|
{
|
||||||
#if DEBUG && !DISABLE_DEBUG
|
private RunHelper _helper;
|
||||||
private EcsProfilerMarker[] _markers;
|
|
||||||
#endif
|
|
||||||
public void FixedRun()
|
|
||||||
{
|
|
||||||
#if DEBUG && !DISABLE_DEBUG
|
|
||||||
for (int i = 0; i < Process.Length; i++)
|
|
||||||
{
|
|
||||||
using (_markers[i].Auto())
|
|
||||||
{
|
|
||||||
Process[i].FixedRun();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
foreach (var item in Process) item.FixedRun();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#if DEBUG && !DISABLE_DEBUG
|
|
||||||
protected override void OnSetup()
|
protected override void OnSetup()
|
||||||
{
|
{
|
||||||
_markers = new EcsProfilerMarker[Process.Length];
|
_helper = new RunHelper(this);
|
||||||
for (int i = 0; i < Process.Length; i++)
|
}
|
||||||
{
|
public void FixedRun()
|
||||||
_markers[i] = new EcsProfilerMarker($"EcsRunner.{Process[i].GetType().Name}.{nameof(FixedRun)}");
|
{
|
||||||
}
|
_helper.Run(p => p.FixedRun());
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using DCFApixels.DragonECS.Core;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
Loading…
Reference in New Issue
Block a user