mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 18:14:37 +08:00
fixes for support unity 2020.1.x
This commit is contained in:
parent
94fdcab168
commit
b2414ec765
@ -28,7 +28,7 @@ namespace DCFApixels.DragonECS
|
|||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
get => _values.Length;
|
get => _values.Length;
|
||||||
}
|
}
|
||||||
public readonly int this[int index]
|
public int this[int index]
|
||||||
{
|
{
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
get => _values[index];
|
get => _values[index];
|
||||||
|
@ -75,7 +75,7 @@ namespace DCFApixels.DragonECS
|
|||||||
internal sealed class ComponentResetHandler<T> : IEcsComponentReset<T>
|
internal sealed class ComponentResetHandler<T> : IEcsComponentReset<T>
|
||||||
where T : IEcsComponentReset<T>
|
where T : IEcsComponentReset<T>
|
||||||
{
|
{
|
||||||
private T _fakeInstnace;
|
private T _fakeInstnace = default;
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public void Reset(ref T component) => _fakeInstnace.Reset(ref component);
|
public void Reset(ref T component) => _fakeInstnace.Reset(ref component);
|
||||||
}
|
}
|
||||||
|
11
src/EcsMask.cs.meta
Normal file
11
src/EcsMask.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e1975c74e7ab50e4dba6bf01902e26e9
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -138,12 +138,12 @@ namespace DCFApixels.DragonECS
|
|||||||
throw new Exception();
|
throw new Exception();
|
||||||
}
|
}
|
||||||
|
|
||||||
Type GetRunnerBaseType(Type type)
|
Type GetRunnerBaseType(Type inType)
|
||||||
{
|
{
|
||||||
if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(EcsRunner<>))
|
if (inType.IsGenericType && inType.GetGenericTypeDefinition() == typeof(EcsRunner<>))
|
||||||
return type;
|
return inType;
|
||||||
if (type.BaseType != null)
|
if (inType.BaseType != null)
|
||||||
return GetRunnerBaseType(type.BaseType);
|
return GetRunnerBaseType(inType.BaseType);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
Type baseType = GetRunnerBaseType(type);
|
Type baseType = GetRunnerBaseType(type);
|
||||||
@ -291,7 +291,7 @@ namespace DCFApixels.DragonECS
|
|||||||
name = Regex.Replace(name, @"\bEcs|Process\b", "");
|
name = Regex.Replace(name, @"\bEcs|Process\b", "");
|
||||||
if (Regex.IsMatch(name, "`\\w{1,}$"))
|
if (Regex.IsMatch(name, "`\\w{1,}$"))
|
||||||
{
|
{
|
||||||
var s = name.Split("`");
|
var s = name.Split('`');
|
||||||
name = s[0] + $"<{s[1]}>";
|
name = s[0] + $"<{s[1]}>";
|
||||||
}
|
}
|
||||||
_processes.Add(type, new ProcessInterface(type, name));
|
_processes.Add(type, new ProcessInterface(type, name));
|
||||||
|
11
src/Utils/ArraySortHalperX.cs.meta
Normal file
11
src/Utils/ArraySortHalperX.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a591de1858028504d819333121bfddd6
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
11
src/Utils/BitsUtility.cs.meta
Normal file
11
src/Utils/BitsUtility.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 06a40460050b1ef4fa037b3a3cac9a8b
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -68,12 +68,14 @@ namespace DCFApixels.DragonECS
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Object
|
#region Object
|
||||||
|
#pragma warning disable CS0809 // Óñòàðåâøèé ÷ëåí ïåðåîïðåäåëÿåò íåóñòàðåâøèé ÷ëåí
|
||||||
[Obsolete("Equals() on ReadOnlySpan will always throw an exception. Use the equality operator instead.")]
|
[Obsolete("Equals() on ReadOnlySpan will always throw an exception. Use the equality operator instead.")]
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
public override bool Equals(object obj) => throw new NotSupportedException();
|
public override bool Equals(object obj) => throw new NotSupportedException();
|
||||||
[Obsolete("GetHashCode() on ReadOnlySpan will always throw an exception.")]
|
[Obsolete("GetHashCode() on ReadOnlySpan will always throw an exception.")]
|
||||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
public override int GetHashCode() => throw new NotSupportedException();
|
public override int GetHashCode() => throw new NotSupportedException();
|
||||||
|
#pragma warning restore CS0809 // Óñòàðåâøèé ÷ëåí ïåðåîïðåäåëÿåò íåóñòàðåâøèé ÷ëåí
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
//if (typeof(T) == typeof(char))
|
//if (typeof(T) == typeof(char))
|
||||||
@ -154,6 +156,18 @@ namespace DCFApixels.DragonECS
|
|||||||
// }
|
// }
|
||||||
// return retVal;
|
// return retVal;
|
||||||
//}
|
//}
|
||||||
|
public void CopyTo(T[] array)
|
||||||
|
{
|
||||||
|
if (_length > array.Length)
|
||||||
|
{
|
||||||
|
throw new ArgumentOutOfRangeException();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < _length; i++)
|
||||||
|
{
|
||||||
|
array[i] = _array[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public ReadOnlySpan<T> Slice(int start)
|
public ReadOnlySpan<T> Slice(int start)
|
||||||
|
11
src/Utils/UnsafeArray.cs.meta
Normal file
11
src/Utils/UnsafeArray.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5d8f3c5034bb040478b60d7421a38ef8
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Loading…
Reference in New Issue
Block a user