diff --git a/Assets/GameScripts/DotNet/Core.meta b/Assets/GameScripts/DotNet/Core.meta
deleted file mode 100644
index 1bda6d1c..00000000
--- a/Assets/GameScripts/DotNet/Core.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: fdae3569c5cbfe54e97778a1f7e7af21
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameScripts/DotNet/Core/Analyzer.meta b/Assets/GameScripts/DotNet/Core/Analyzer.meta
deleted file mode 100644
index 79703a5b..00000000
--- a/Assets/GameScripts/DotNet/Core/Analyzer.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 8d0854a24c1619b43ace830bfa1b6e69
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameScripts/DotNet/Core/Analyzer/ChildOfAttribute.cs b/Assets/GameScripts/DotNet/Core/Analyzer/ChildOfAttribute.cs
deleted file mode 100644
index c28b96c5..00000000
--- a/Assets/GameScripts/DotNet/Core/Analyzer/ChildOfAttribute.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System;
-
-namespace ET
-{
- [AttributeUsage(AttributeTargets.Class)]
- public class ChildOfAttribute : Attribute
- {
- public Type type;
-
- public ChildOfAttribute(Type type = null)
- {
- this.type = type;
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/GameScripts/DotNet/Core/Analyzer/ChildOfAttribute.cs.meta b/Assets/GameScripts/DotNet/Core/Analyzer/ChildOfAttribute.cs.meta
deleted file mode 100644
index 3f8854f4..00000000
--- a/Assets/GameScripts/DotNet/Core/Analyzer/ChildOfAttribute.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 9e06bd31e846d9a4abe88d5864a0a4d3
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameScripts/DotNet/Core/Analyzer/ComponentOfAttribute.cs b/Assets/GameScripts/DotNet/Core/Analyzer/ComponentOfAttribute.cs
deleted file mode 100644
index db116da6..00000000
--- a/Assets/GameScripts/DotNet/Core/Analyzer/ComponentOfAttribute.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System;
-
-namespace ET
-{
- ///
- /// 组件类父级实体类型约束
- /// 父级实体类型唯一的 标记指定父级实体类型[ComponentOf(typeof(parentType)]
- /// 不唯一则标记[ComponentOf]
- ///
- [AttributeUsage(AttributeTargets.Class)]
- public class ComponentOfAttribute : Attribute
- {
- public Type Type;
-
- public ComponentOfAttribute(Type type = null)
- {
- this.Type = type;
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/GameScripts/DotNet/Core/Analyzer/ComponentOfAttribute.cs.meta b/Assets/GameScripts/DotNet/Core/Analyzer/ComponentOfAttribute.cs.meta
deleted file mode 100644
index 399efc13..00000000
--- a/Assets/GameScripts/DotNet/Core/Analyzer/ComponentOfAttribute.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 3e17786fd2fafce4f9d9fbdcdbf5b9fc
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameScripts/DotNet/Core/Analyzer/EnableAccessEntiyChildAttribute.cs b/Assets/GameScripts/DotNet/Core/Analyzer/EnableAccessEntiyChildAttribute.cs
deleted file mode 100644
index 25c5aa2a..00000000
--- a/Assets/GameScripts/DotNet/Core/Analyzer/EnableAccessEntiyChildAttribute.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System;
-
-namespace ET
-{
- ///
- /// 当方法或属性内需要访问Entity类的child和component时 使用此标签
- /// 仅供必要时使用 大多数情况推荐通过Entity的子类访问
- ///
- [AttributeUsage(AttributeTargets.Method|AttributeTargets.Property)]
- public class EnableAccessEntiyChildAttribute : Attribute
- {
-
- }
-}
-
diff --git a/Assets/GameScripts/DotNet/Core/Analyzer/EnableAccessEntiyChildAttribute.cs.meta b/Assets/GameScripts/DotNet/Core/Analyzer/EnableAccessEntiyChildAttribute.cs.meta
deleted file mode 100644
index 00d8cd6e..00000000
--- a/Assets/GameScripts/DotNet/Core/Analyzer/EnableAccessEntiyChildAttribute.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 5b4d17f76cb73474e94eb82e30be2560
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameScripts/DotNet/Core/Analyzer/EnableClassAttribute.cs b/Assets/GameScripts/DotNet/Core/Analyzer/EnableClassAttribute.cs
deleted file mode 100644
index 09ebee32..00000000
--- a/Assets/GameScripts/DotNet/Core/Analyzer/EnableClassAttribute.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace ET
-{
- public class EnableClassAttribute: BaseAttribute
- {
- }
-}
\ No newline at end of file
diff --git a/Assets/GameScripts/DotNet/Core/Analyzer/EnableClassAttribute.cs.meta b/Assets/GameScripts/DotNet/Core/Analyzer/EnableClassAttribute.cs.meta
deleted file mode 100644
index 0f05609b..00000000
--- a/Assets/GameScripts/DotNet/Core/Analyzer/EnableClassAttribute.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 41028c857d1434bd78bb45a748e476e8
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameScripts/DotNet/Core/Analyzer/EnableMethodAttribute.cs b/Assets/GameScripts/DotNet/Core/Analyzer/EnableMethodAttribute.cs
deleted file mode 100644
index ea60b02c..00000000
--- a/Assets/GameScripts/DotNet/Core/Analyzer/EnableMethodAttribute.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System;
-
-namespace ET
-{
- ///
- /// 对于特殊实体类 允许类内部声明方法的标签
- ///
- [AttributeUsage(AttributeTargets.Class, Inherited = false)]
- public class EnableMethodAttribute : Attribute
- {
-
- }
-}
\ No newline at end of file
diff --git a/Assets/GameScripts/DotNet/Core/Analyzer/EnableMethodAttribute.cs.meta b/Assets/GameScripts/DotNet/Core/Analyzer/EnableMethodAttribute.cs.meta
deleted file mode 100644
index c3efb283..00000000
--- a/Assets/GameScripts/DotNet/Core/Analyzer/EnableMethodAttribute.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: ce20015df46fb774eaf1cacc7cd9e35b
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameScripts/DotNet/Core/Analyzer/EntitySystemOf.cs b/Assets/GameScripts/DotNet/Core/Analyzer/EntitySystemOf.cs
deleted file mode 100644
index 9856cbd4..00000000
--- a/Assets/GameScripts/DotNet/Core/Analyzer/EntitySystemOf.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using System;
-
-namespace ET
-{
- [AttributeUsage(AttributeTargets.Class)]
- public class EntitySystemOfAttribute: BaseAttribute
- {
- public Type type;
-
- public EntitySystemOfAttribute(Type type)
- {
- this.type = type;
- }
- }
-
- [AttributeUsage(AttributeTargets.Class)]
- public class LSEntitySystemOfAttribute: BaseAttribute
- {
- public Type type;
-
- public LSEntitySystemOfAttribute(Type type)
- {
- this.type = type;
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/GameScripts/DotNet/Core/Analyzer/EntitySystemOf.cs.meta b/Assets/GameScripts/DotNet/Core/Analyzer/EntitySystemOf.cs.meta
deleted file mode 100644
index 1d796f7f..00000000
--- a/Assets/GameScripts/DotNet/Core/Analyzer/EntitySystemOf.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 50901d1f8551c05499583f1a5d362d06
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameScripts/DotNet/Core/Analyzer/FriendOfAttribute.cs b/Assets/GameScripts/DotNet/Core/Analyzer/FriendOfAttribute.cs
deleted file mode 100644
index 393ad55d..00000000
--- a/Assets/GameScripts/DotNet/Core/Analyzer/FriendOfAttribute.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System;
-
-namespace ET
-{
-
- [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
- public class FriendOfAttribute : Attribute
- {
- public Type Type;
-
- public FriendOfAttribute(Type type)
- {
- this.Type = type;
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/GameScripts/DotNet/Core/Analyzer/FriendOfAttribute.cs.meta b/Assets/GameScripts/DotNet/Core/Analyzer/FriendOfAttribute.cs.meta
deleted file mode 100644
index a7baa5e7..00000000
--- a/Assets/GameScripts/DotNet/Core/Analyzer/FriendOfAttribute.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 516811198a72ec541a5f8f0e40454fa5
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameScripts/DotNet/Core/Analyzer/StaticFieldAttribute.cs b/Assets/GameScripts/DotNet/Core/Analyzer/StaticFieldAttribute.cs
deleted file mode 100644
index f46301cf..00000000
--- a/Assets/GameScripts/DotNet/Core/Analyzer/StaticFieldAttribute.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System;
-
-namespace ET
-{
- ///
- /// 静态字段需加此标签
- /// valueToAssign: 初始化时的字段值
- /// assignNewTypeInstance: 从默认构造函数初始化
- ///
- [AttributeUsage(AttributeTargets.Field)]
- public class StaticFieldAttribute: Attribute
- {
- public readonly object valueToAssign;
-
- public readonly bool assignNewTypeInstance;
-
- public StaticFieldAttribute()
- {
- this.valueToAssign = null;
- this.assignNewTypeInstance = false;
- }
-
- public StaticFieldAttribute(object valueToAssign )
- {
- this.valueToAssign = valueToAssign ;
- this.assignNewTypeInstance = false;
- }
-
- public StaticFieldAttribute(bool assignNewTypeInstance)
- {
- this.valueToAssign = null;
- this.assignNewTypeInstance = assignNewTypeInstance;
- }
- }
-}
-
diff --git a/Assets/GameScripts/DotNet/Core/Analyzer/StaticFieldAttribute.cs.meta b/Assets/GameScripts/DotNet/Core/Analyzer/StaticFieldAttribute.cs.meta
deleted file mode 100644
index cb2b4b82..00000000
--- a/Assets/GameScripts/DotNet/Core/Analyzer/StaticFieldAttribute.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: f0f1fd366c9df9c439b8e552ac26e607
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameScripts/DotNet/Core/Analyzer/UniqueIdAttribute.cs b/Assets/GameScripts/DotNet/Core/Analyzer/UniqueIdAttribute.cs
deleted file mode 100644
index 37a2a749..00000000
--- a/Assets/GameScripts/DotNet/Core/Analyzer/UniqueIdAttribute.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System;
-
-namespace ET
-{
- ///
- /// 唯一Id标签
- /// 使用此标签标记的类 会检测类内部的 const int 字段成员是否唯一
- /// 可以指定唯一Id的最小值 最大值区间
- ///
- [AttributeUsage(AttributeTargets.Class, Inherited = false)]
- public class UniqueIdAttribute : Attribute
- {
- public int Min;
-
- public int Max;
-
- public UniqueIdAttribute(int min = int.MinValue, int max = int.MaxValue)
- {
- this.Min = min;
- this.Max = max;
- }
- }
-}
-
diff --git a/Assets/GameScripts/DotNet/Core/Analyzer/UniqueIdAttribute.cs.meta b/Assets/GameScripts/DotNet/Core/Analyzer/UniqueIdAttribute.cs.meta
deleted file mode 100644
index 845072df..00000000
--- a/Assets/GameScripts/DotNet/Core/Analyzer/UniqueIdAttribute.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 62584bd88ecb9ce439aeaaf2f76605f5
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameScripts/DotNet/Core/DoubleMap.cs b/Assets/GameScripts/DotNet/Core/DoubleMap.cs
deleted file mode 100644
index 6e10998d..00000000
--- a/Assets/GameScripts/DotNet/Core/DoubleMap.cs
+++ /dev/null
@@ -1,144 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace ET
-{
- public class DoubleMap
- {
- private readonly Dictionary kv = new Dictionary();
- private readonly Dictionary vk = new Dictionary();
-
- public DoubleMap()
- {
- }
-
- public DoubleMap(int capacity)
- {
- kv = new Dictionary(capacity);
- vk = new Dictionary(capacity);
- }
-
- public void ForEach(Action action)
- {
- if (action == null)
- {
- return;
- }
- Dictionary.KeyCollection keys = kv.Keys;
- foreach (K key in keys)
- {
- action(key, kv[key]);
- }
- }
-
- public List Keys
- {
- get
- {
- return new List(kv.Keys);
- }
- }
-
- public List Values
- {
- get
- {
- return new List(vk.Keys);
- }
- }
-
- public void Add(K key, V value)
- {
- if (key == null || value == null || kv.ContainsKey(key) || vk.ContainsKey(value))
- {
- return;
- }
- kv.Add(key, value);
- vk.Add(value, key);
- }
-
- public V GetValueByKey(K key)
- {
- if (key != null && kv.ContainsKey(key))
- {
- return kv[key];
- }
- return default(V);
- }
-
- public K GetKeyByValue(V value)
- {
- if (value != null && vk.ContainsKey(value))
- {
- return vk[value];
- }
- return default(K);
- }
-
- public void RemoveByKey(K key)
- {
- if (key == null)
- {
- return;
- }
- V value;
- if (!kv.TryGetValue(key, out value))
- {
- return;
- }
-
- kv.Remove(key);
- vk.Remove(value);
- }
-
- public void RemoveByValue(V value)
- {
- if (value == null)
- {
- return;
- }
-
- K key;
- if (!vk.TryGetValue(value, out key))
- {
- return;
- }
-
- kv.Remove(key);
- vk.Remove(value);
- }
-
- public void Clear()
- {
- kv.Clear();
- vk.Clear();
- }
-
- public bool ContainsKey(K key)
- {
- if (key == null)
- {
- return false;
- }
- return kv.ContainsKey(key);
- }
-
- public bool ContainsValue(V value)
- {
- if (value == null)
- {
- return false;
- }
- return vk.ContainsKey(value);
- }
-
- public bool Contains(K key, V value)
- {
- if (key == null || value == null)
- {
- return false;
- }
- return kv.ContainsKey(key) && vk.ContainsKey(value);
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/GameScripts/DotNet/Core/DoubleMap.cs.meta b/Assets/GameScripts/DotNet/Core/DoubleMap.cs.meta
deleted file mode 100644
index 23dfecd9..00000000
--- a/Assets/GameScripts/DotNet/Core/DoubleMap.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 715c9cf0f50f1fb4c98a8783cb1da714
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameScripts/DotNet/Core/Entity.meta b/Assets/GameScripts/DotNet/Core/Entity.meta
deleted file mode 100644
index 29b664c7..00000000
--- a/Assets/GameScripts/DotNet/Core/Entity.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: afe14daee40145d44938d748993f4775
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameScripts/DotNet/Core/Entity/ComponentView.cs b/Assets/GameScripts/DotNet/Core/Entity/ComponentView.cs
deleted file mode 100644
index 02456b7e..00000000
--- a/Assets/GameScripts/DotNet/Core/Entity/ComponentView.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-#if ENABLE_VIEW && UNITY_EDITOR
-using UnityEngine;
-
-namespace ET
-{
- public class ComponentView: MonoBehaviour
- {
- public Entity Component
- {
- get;
- set;
- }
- }
-}
-#endif
\ No newline at end of file
diff --git a/Assets/GameScripts/DotNet/Core/Entity/ComponentView.cs.meta b/Assets/GameScripts/DotNet/Core/Entity/ComponentView.cs.meta
deleted file mode 100644
index 801fca26..00000000
--- a/Assets/GameScripts/DotNet/Core/Entity/ComponentView.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 97f627452e3dae143943e08b0c5b20ef
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameScripts/DotNet/Core/Entity/Entity.cs b/Assets/GameScripts/DotNet/Core/Entity/Entity.cs
deleted file mode 100644
index 04bb8531..00000000
--- a/Assets/GameScripts/DotNet/Core/Entity/Entity.cs
+++ /dev/null
@@ -1,1011 +0,0 @@
-using System;
-using System.Collections.Generic;
-using MongoDB.Bson.Serialization.Attributes;
-
-namespace ET
-{
- [Flags]
- public enum EntityStatus: byte
- {
- None = 0,
- IsFromPool = 1,
- IsRegister = 1 << 1,
- IsComponent = 1 << 2,
- IsCreated = 1 << 3,
- IsNew = 1 << 4,
- }
-
- public interface IEntitySystem
- {
- EntitySystem EntitySystem { get; }
- }
-
- public interface IIdGenerater
- {
- IdGenerater IdGenerater { get; }
- }
-
- public partial class Entity: DisposeObject
- {
-#if ENABLE_VIEW && UNITY_EDITOR
- [UnityEngine.HideInInspector]
- public UnityEngine.GameObject ViewGO;
-#endif
-
- [BsonIgnore]
- public long InstanceId { get; protected set; }
-
- protected Entity()
- {
- }
-
- [BsonIgnore]
- private EntityStatus status = EntityStatus.None;
-
- [BsonIgnore]
- public bool IsFromPool
- {
- get => (this.status & EntityStatus.IsFromPool) == EntityStatus.IsFromPool;
- set
- {
- if (value)
- {
- this.status |= EntityStatus.IsFromPool;
- }
- else
- {
- this.status &= ~EntityStatus.IsFromPool;
- }
- }
- }
-
- [BsonIgnore]
- protected bool IsRegister
- {
- get => (this.status & EntityStatus.IsRegister) == EntityStatus.IsRegister;
- set
- {
- if (this.IsRegister == value)
- {
- return;
- }
-
- if (value)
- {
- this.status |= EntityStatus.IsRegister;
- }
- else
- {
- this.status &= ~EntityStatus.IsRegister;
- }
-
- if (value)
- {
- this.RegisterSystem();
- }
-
-#if ENABLE_VIEW && UNITY_EDITOR
- if (value)
- {
- this.ViewGO = new UnityEngine.GameObject(this.ViewName);
- this.ViewGO.AddComponent().Component = this;
- this.ViewGO.transform.SetParent(this.Parent == null?
- UnityEngine.GameObject.Find("Global/Scenes").transform : this.Parent.ViewGO.transform);
- }
- else
- {
- UnityEngine.Object.Destroy(this.ViewGO);
- }
-#endif
- }
- }
-
- private EntitySystem GetEntitySystem()
- {
- return this.iScene.Fiber.EntitySystem;
- }
-
- private IdGenerater GetIdGenerater()
- {
- return this.iScene.Fiber.IdGenerater;
- }
-
- protected virtual void RegisterSystem()
- {
- this.GetEntitySystem().RegisterSystem(this);
- }
-
- protected virtual string ViewName
- {
- get
- {
- return this.GetType().FullName;
- }
- }
-
- [BsonIgnore]
- protected bool IsComponent
- {
- get => (this.status & EntityStatus.IsComponent) == EntityStatus.IsComponent;
- set
- {
- if (value)
- {
- this.status |= EntityStatus.IsComponent;
- }
- else
- {
- this.status &= ~EntityStatus.IsComponent;
- }
- }
- }
-
- [BsonIgnore]
- protected bool IsCreated
- {
- get => (this.status & EntityStatus.IsCreated) == EntityStatus.IsCreated;
- set
- {
- if (value)
- {
- this.status |= EntityStatus.IsCreated;
- }
- else
- {
- this.status &= ~EntityStatus.IsCreated;
- }
- }
- }
-
- [BsonIgnore]
- protected bool IsNew
- {
- get => (this.status & EntityStatus.IsNew) == EntityStatus.IsNew;
- set
- {
- if (value)
- {
- this.status |= EntityStatus.IsNew;
- }
- else
- {
- this.status &= ~EntityStatus.IsNew;
- }
- }
- }
-
- [BsonIgnore]
- public bool IsDisposed => this.InstanceId == 0;
-
- [BsonIgnore]
- private Entity parent;
-
- // 可以改变parent,但是不能设置为null
- [BsonIgnore]
- public Entity Parent
- {
- get => this.parent;
- protected set
- {
- if (value == null)
- {
- throw new Exception($"cant set parent null: {this.GetType().FullName}");
- }
-
- if (value == this)
- {
- throw new Exception($"cant set parent self: {this.GetType().FullName}");
- }
-
- // 严格限制parent必须要有domain,也就是说parent必须在数据树上面
- if (value.IScene == null)
- {
- throw new Exception($"cant set parent because parent domain is null: {this.GetType().FullName} {value.GetType().FullName}");
- }
-
- if (this.parent != null) // 之前有parent
- {
- // parent相同,不设置
- if (this.parent == value)
- {
- Log.Error($"重复设置了Parent: {this.GetType().FullName} parent: {this.parent.GetType().FullName}");
- return;
- }
-
- this.parent.RemoveFromChildren(this);
- }
-
- this.parent = value;
- this.IsComponent = false;
- this.parent.AddToChildren(this);
-
- if (this is IScene scene)
- {
- scene.Fiber = this.parent.iScene.Fiber;
- this.IScene = scene;
- }
- else
- {
- this.IScene = this.parent.iScene;
- }
-
-#if ENABLE_VIEW && UNITY_EDITOR
- this.ViewGO.GetComponent().Component = this;
- this.ViewGO.transform.SetParent(this.Parent == null ?
- UnityEngine.GameObject.Find("Global").transform : this.Parent.ViewGO.transform);
- foreach (var child in this.Children.Values)
- {
- child.ViewGO.transform.SetParent(this.ViewGO.transform);
- }
- foreach (var comp in this.Components.Values)
- {
- comp.ViewGO.transform.SetParent(this.ViewGO.transform);
- }
-#endif
- }
- }
-
- // 该方法只能在AddComponent中调用,其他人不允许调用
- [BsonIgnore]
- private Entity ComponentParent
- {
- set
- {
- if (value == null)
- {
- throw new Exception($"cant set parent null: {this.GetType().FullName}");
- }
-
- if (value == this)
- {
- throw new Exception($"cant set parent self: {this.GetType().FullName}");
- }
-
- // 严格限制parent必须要有domain,也就是说parent必须在数据树上面
- if (value.IScene == null)
- {
- throw new Exception($"cant set parent because parent domain is null: {this.GetType().FullName} {value.GetType().FullName}");
- }
-
- if (this.parent != null) // 之前有parent
- {
- // parent相同,不设置
- if (this.parent == value)
- {
- Log.Error($"重复设置了Parent: {this.GetType().FullName} parent: {this.parent.GetType().FullName}");
- return;
- }
-
- this.parent.RemoveFromComponents(this);
- }
-
- this.parent = value;
- this.IsComponent = true;
- this.parent.AddToComponents(this);
-
- if (this is IScene scene)
- {
- scene.Fiber = this.parent.iScene.Fiber;
- this.IScene = scene;
- }
- else
- {
- this.IScene = this.parent.iScene;
- }
- }
- }
-
- public T GetParent() where T : Entity
- {
- return this.Parent as T;
- }
-
- [BsonIgnoreIfDefault]
- [BsonDefaultValue(0L)]
- [BsonElement]
- [BsonId]
- public long Id { get; protected set; }
-
- [BsonIgnore]
- protected IScene iScene;
-
- [BsonIgnore]
- public IScene IScene
- {
- get
- {
- return this.iScene;
- }
- protected set
- {
- if (value == null)
- {
- throw new Exception($"domain cant set null: {this.GetType().FullName}");
- }
-
- if (this.iScene == value)
- {
- return;
- }
-
- IScene preScene = this.iScene;
- this.iScene = value;
-
- if (preScene == null)
- {
- if (this.InstanceId == 0)
- {
- this.InstanceId = this.GetIdGenerater().GenerateInstanceId();
- }
-
- this.IsRegister = true;
-
- // 反序列化出来的需要设置父子关系
- if (this.componentsDB != null)
- {
- foreach (Entity component in this.componentsDB)
- {
- component.IsComponent = true;
- this.Components.Add(component.GetType().FullName, component);
- component.parent = this;
- }
- }
-
- if (this.childrenDB != null)
- {
- foreach (Entity child in this.childrenDB)
- {
- child.IsComponent = false;
- this.Children.Add(child.Id, child);
- child.parent = this;
- }
- }
- }
-
- // 递归设置孩子的Domain
- if (this.children != null)
- {
- foreach (Entity entity in this.children.Values)
- {
- entity.IScene = this.iScene;
- }
- }
-
- if (this.components != null)
- {
- foreach (Entity component in this.components.Values)
- {
- component.IScene = this.iScene;
- }
- }
-
- if (!this.IsCreated)
- {
- this.IsCreated = true;
- EntitySystemSingleton.Instance.Deserialize(this);
- }
- }
- }
-
- [BsonElement("Children")]
- [BsonIgnoreIfNull]
- private List childrenDB;
-
- [BsonIgnore]
- private SortedDictionary children;
-
- [BsonIgnore]
- public SortedDictionary Children
- {
- get
- {
- return this.children ??= ObjectPool.Instance.Fetch>();
- }
- }
-
- private void AddToChildren(Entity entity)
- {
- this.Children.Add(entity.Id, entity);
- }
-
- private void RemoveFromChildren(Entity entity)
- {
- if (this.children == null)
- {
- return;
- }
-
- this.children.Remove(entity.Id);
-
- if (this.children.Count == 0)
- {
- ObjectPool.Instance.Recycle(this.children);
- this.children = null;
- }
- }
-
- [BsonElement("C")]
- [BsonIgnoreIfNull]
- private List componentsDB;
-
- [BsonIgnore]
- private SortedDictionary components;
-
- [BsonIgnore]
- public SortedDictionary Components
- {
- get
- {
- return this.components ??= ObjectPool.Instance.Fetch>();
- }
- }
-
- public int ComponentsCount()
- {
- if (this.components == null)
- {
- return 0;
- }
- return this.components.Count;
- }
-
- public int ChildrenCount()
- {
- if (this.children == null)
- {
- return 0;
- }
- return this.children.Count;
- }
-
- public override void Dispose()
- {
- if (this.IsDisposed)
- {
- return;
- }
-
- this.IsRegister = false;
- this.InstanceId = 0;
-
- ObjectPool objectPool = ObjectPool.Instance;
- // 清理Children
- if (this.children != null)
- {
- foreach (Entity child in this.children.Values)
- {
- child.Dispose();
- }
-
- this.children.Clear();
- objectPool.Recycle(this.children);
- this.children = null;
-
- if (this.childrenDB != null)
- {
- this.childrenDB.Clear();
- // 创建的才需要回到池中,从db中不需要回收
- if (this.IsNew)
- {
- objectPool.Recycle(this.childrenDB);
- this.childrenDB = null;
- }
- }
- }
-
- // 清理Component
- if (this.components != null)
- {
- foreach (KeyValuePair kv in this.components)
- {
- kv.Value.Dispose();
- }
-
- this.components.Clear();
- objectPool.Recycle(this.components);
- this.components = null;
-
- // 创建的才需要回到池中,从db中不需要回收
- if (this.componentsDB != null)
- {
- this.componentsDB.Clear();
- if (this.IsNew)
- {
- objectPool.Recycle(this.componentsDB);
- this.componentsDB = null;
- }
- }
- }
-
- // 触发Destroy事件
- if (this is IDestroy)
- {
- EntitySystemSingleton.Instance.Destroy(this);
- }
-
- this.iScene = null;
-
- if (this.parent != null && !this.parent.IsDisposed)
- {
- if (this.IsComponent)
- {
- this.parent.RemoveComponent(this);
- }
- else
- {
- this.parent.RemoveFromChildren(this);
- }
- }
-
- this.parent = null;
-
- base.Dispose();
-
- status = EntityStatus.None;
-
- if (this.IsFromPool)
- {
- ObjectPool.Instance.Recycle(this);
- }
- }
-
- private void AddToComponents(Entity component)
- {
- this.Components.Add(component.GetType().FullName, component);
- }
-
- private void RemoveFromComponents(Entity component)
- {
- if (this.components == null)
- {
- return;
- }
-
- this.components.Remove(component.GetType().FullName);
-
- if (this.components.Count == 0)
- {
- ObjectPool.Instance.Recycle(this.components);
- this.components = null;
- }
- }
-
- public K GetChild(long id) where K : Entity
- {
- if (this.children == null)
- {
- return null;
- }
-
- this.children.TryGetValue(id, out Entity child);
- return child as K;
- }
-
- public void RemoveChild(long id)
- {
- if (this.children == null)
- {
- return;
- }
-
- if (!this.children.TryGetValue(id, out Entity child))
- {
- return;
- }
-
- this.children.Remove(id);
- child.Dispose();
- }
-
- public void RemoveComponent() where K : Entity
- {
- if (this.IsDisposed)
- {
- return;
- }
-
- if (this.components == null)
- {
- return;
- }
-
- Type type = typeof (K);
- Entity c = this.GetComponent(type);
- if (c == null)
- {
- return;
- }
-
- this.RemoveFromComponents(c);
- c.Dispose();
- }
-
- private void RemoveComponent(Entity component)
- {
- if (this.IsDisposed)
- {
- return;
- }
-
- if (this.components == null)
- {
- return;
- }
-
- Entity c = this.GetComponent(component.GetType());
- if (c == null)
- {
- return;
- }
-
- if (c.InstanceId != component.InstanceId)
- {
- return;
- }
-
- this.RemoveFromComponents(c);
- c.Dispose();
- }
-
- public void RemoveComponent(Type type)
- {
- if (this.IsDisposed)
- {
- return;
- }
-
- Entity c = this.GetComponent(type);
- if (c == null)
- {
- return;
- }
-
- RemoveFromComponents(c);
- c.Dispose();
- }
-
- public K GetComponent() where K : Entity
- {
- if (this.components == null)
- {
- return null;
- }
-
- Entity component;
- if (!this.components.TryGetValue(typeof (K).FullName, out component))
- {
- return default;
- }
-
- // 如果有IGetComponent接口,则触发GetComponentSystem
- if (this is IGetComponent)
- {
- EntitySystemSingleton.Instance.GetComponent(this, component);
- }
-
- return (K) component;
- }
-
- public Entity GetComponent(Type type)
- {
- if (this.components == null)
- {
- return null;
- }
-
- Entity component;
- if (!this.components.TryGetValue(type.FullName, out component))
- {
- return null;
- }
-
- // 如果有IGetComponent接口,则触发GetComponentSystem
- if (this is IGetComponent)
- {
- EntitySystemSingleton.Instance.GetComponent(this, component);
- }
-
- return component;
- }
-
- private static Entity Create(Type type, bool isFromPool)
- {
- Entity component;
- if (isFromPool)
- {
- component = (Entity) ObjectPool.Instance.Fetch(type);
- }
- else
- {
- component = Activator.CreateInstance(type) as Entity;
- }
-
- component.IsFromPool = isFromPool;
- component.IsCreated = true;
- component.IsNew = true;
- component.Id = 0;
- return component;
- }
-
- public Entity AddComponent(Entity component)
- {
- Type type = component.GetType();
- if (this.components != null && this.components.ContainsKey(type.FullName))
- {
- throw new Exception($"entity already has component: {type.FullName}");
- }
-
- component.ComponentParent = this;
-
- if (this is IAddComponent)
- {
- EntitySystemSingleton.Instance.AddComponent(this, component);
- }
-
- return component;
- }
-
- public Entity AddComponent(Type type, bool isFromPool = false)
- {
- if (this.components != null && this.components.ContainsKey(type.FullName))
- {
- throw new Exception($"entity already has component: {type.FullName}");
- }
-
- Entity component = Create(type, isFromPool);
- component.Id = this.Id;
- component.ComponentParent = this;
- EntitySystemSingleton entitySystemSingleton = EntitySystemSingleton.Instance;
- entitySystemSingleton.Awake(component);
-
- if (this is IAddComponent)
- {
- entitySystemSingleton.AddComponent(this, component);
- }
-
- return component;
- }
-
- public K AddComponentWithId(long id, bool isFromPool = false) where K : Entity, IAwake, new()
- {
- Type type = typeof (K);
- if (this.components != null && this.components.ContainsKey(type.FullName))
- {
- throw new Exception($"entity already has component: {type.FullName}");
- }
-
- Entity component = Create(type, isFromPool);
- component.Id = id;
- component.ComponentParent = this;
- EntitySystemSingleton entitySystemSingleton = EntitySystemSingleton.Instance;
- entitySystemSingleton.Awake(component);
-
- if (this is IAddComponent)
- {
- entitySystemSingleton.AddComponent(this, component);
- }
-
- return component as K;
- }
-
- public K AddComponentWithId(long id, P1 p1, bool isFromPool = false) where K : Entity, IAwake, new()
- {
- Type type = typeof (K);
- if (this.components != null && this.components.ContainsKey(type.FullName))
- {
- throw new Exception($"entity already has component: {type.FullName}");
- }
-
- Entity component = Create(type, isFromPool);
- component.Id = id;
- component.ComponentParent = this;
- EntitySystemSingleton entitySystemSingleton = EntitySystemSingleton.Instance;
- entitySystemSingleton.Awake(component, p1);
-
- if (this is IAddComponent)
- {
- entitySystemSingleton.AddComponent(this, component);
- }
-
- return component as K;
- }
-
- public K AddComponentWithId(long id, P1 p1, P2 p2, bool isFromPool = false) where K : Entity, IAwake, new()
- {
- Type type = typeof (K);
- if (this.components != null && this.components.ContainsKey(type.FullName))
- {
- throw new Exception($"entity already has component: {type.FullName}");
- }
-
- Entity component = Create(type, isFromPool);
- component.Id = id;
- component.ComponentParent = this;
- EntitySystemSingleton entitySystemSingleton = EntitySystemSingleton.Instance;
- entitySystemSingleton.Awake(component, p1, p2);
-
- if (this is IAddComponent)
- {
- entitySystemSingleton.AddComponent(this, component);
- }
-
- return component as K;
- }
-
- public K AddComponentWithId(long id, P1 p1, P2 p2, P3 p3, bool isFromPool = false) where K : Entity, IAwake, new()
- {
- Type type = typeof (K);
- if (this.components != null && this.components.ContainsKey(type.FullName))
- {
- throw new Exception($"entity already has component: {type.FullName}");
- }
-
- Entity component = Create(type, isFromPool);
- component.Id = id;
- component.ComponentParent = this;
- EntitySystemSingleton entitySystemSingleton = EntitySystemSingleton.Instance;
- entitySystemSingleton.Awake(component, p1, p2, p3);
-
- if (this is IAddComponent)
- {
- entitySystemSingleton.AddComponent(this, component);
- }
-
- return component as K;
- }
-
- public K AddComponent(bool isFromPool = false) where K : Entity, IAwake, new()
- {
- return this.AddComponentWithId(this.Id, isFromPool);
- }
-
- public K AddComponent(P1 p1, bool isFromPool = false) where K : Entity, IAwake, new()
- {
- return this.AddComponentWithId(this.Id, p1, isFromPool);
- }
-
- public K AddComponent(P1 p1, P2 p2, bool isFromPool = false) where K : Entity, IAwake, new()
- {
- return this.AddComponentWithId(this.Id, p1, p2, isFromPool);
- }
-
- public K AddComponent(P1 p1, P2 p2, P3 p3, bool isFromPool = false) where K : Entity, IAwake, new()
- {
- return this.AddComponentWithId(this.Id, p1, p2, p3, isFromPool);
- }
-
- public Entity AddChild(Entity entity)
- {
- entity.Parent = this;
- return entity;
- }
-
- public T AddChild(bool isFromPool = false) where T : Entity, IAwake
- {
- Type type = typeof (T);
- T component = (T) Entity.Create(type, isFromPool);
- component.Id = this.GetIdGenerater().GenerateId();
- component.Parent = this;
-
- EntitySystemSingleton.Instance.Awake(component);
- return component;
- }
-
- public T AddChild(A a, bool isFromPool = false) where T : Entity, IAwake
- {
- Type type = typeof (T);
- T component = (T) Entity.Create(type, isFromPool);
- component.Id = this.GetIdGenerater().GenerateId();
- component.Parent = this;
-
- EntitySystemSingleton.Instance.Awake(component, a);
- return component;
- }
-
- public T AddChild(A a, B b, bool isFromPool = false) where T : Entity, IAwake
- {
- Type type = typeof (T);
- T component = (T) Entity.Create(type, isFromPool);
- component.Id = this.GetIdGenerater().GenerateId();
- component.Parent = this;
-
- EntitySystemSingleton.Instance.Awake(component, a, b);
- return component;
- }
-
- public T AddChild(A a, B b, C c, bool isFromPool = false) where T : Entity, IAwake
- {
- Type type = typeof (T);
- T component = (T) Entity.Create(type, isFromPool);
- component.Id = this.GetIdGenerater().GenerateId();
- component.Parent = this;
-
- EntitySystemSingleton.Instance.Awake(component, a, b, c);
- return component;
- }
-
- public T AddChildWithId(long id, bool isFromPool = false) where T : Entity, IAwake
- {
- Type type = typeof (T);
- T component = Entity.Create(type, isFromPool) as T;
- component.Id = id;
- component.Parent = this;
- EntitySystemSingleton.Instance.Awake(component);
- return component;
- }
-
- public T AddChildWithId(long id, A a, bool isFromPool = false) where T : Entity, IAwake
- {
- Type type = typeof (T);
- T component = (T) Entity.Create(type, isFromPool);
- component.Id = id;
- component.Parent = this;
-
- EntitySystemSingleton.Instance.Awake(component, a);
- return component;
- }
-
- public T AddChildWithId(long id, A a, B b, bool isFromPool = false) where T : Entity, IAwake
- {
- Type type = typeof (T);
- T component = (T) Entity.Create(type, isFromPool);
- component.Id = id;
- component.Parent = this;
-
- EntitySystemSingleton.Instance.Awake(component, a, b);
- return component;
- }
-
- public T AddChildWithId(long id, A a, B b, C c, bool isFromPool = false) where T : Entity, IAwake
- {
- Type type = typeof (T);
- T component = (T) Entity.Create(type, isFromPool);
- component.Id = id;
- component.Parent = this;
-
- EntitySystemSingleton.Instance.Awake(component, a, b, c);
- return component;
- }
-
- public override void BeginInit()
- {
- EntitySystemSingleton.Instance.Serialize(this);
-
- this.componentsDB?.Clear();
- if (this.components != null && this.components.Count != 0)
- {
- ObjectPool objectPool = ObjectPool.Instance;
- foreach (Entity entity in this.components.Values)
- {
- if (entity is not ISerializeToEntity)
- {
- continue;
- }
-
- this.componentsDB ??= objectPool.Fetch>();
- this.componentsDB.Add(entity);
-
- entity.BeginInit();
- }
- }
-
- this.childrenDB?.Clear();
- if (this.children != null && this.children.Count != 0)
- {
- ObjectPool objectPool = ObjectPool.Instance;
- foreach (Entity entity in this.children.Values)
- {
- if (entity is not ISerializeToEntity)
- {
- continue;
- }
-
- this.childrenDB ??= objectPool.Fetch>();
- this.childrenDB.Add(entity);
-
- entity.BeginInit();
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/GameScripts/DotNet/Core/Entity/Entity.cs.meta b/Assets/GameScripts/DotNet/Core/Entity/Entity.cs.meta
deleted file mode 100644
index e2fad844..00000000
--- a/Assets/GameScripts/DotNet/Core/Entity/Entity.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 580c95b9e9aaeba43a04eff4ff74b46e
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameScripts/DotNet/Core/Entity/EntityHelper.cs b/Assets/GameScripts/DotNet/Core/Entity/EntityHelper.cs
deleted file mode 100644
index 5c08770e..00000000
--- a/Assets/GameScripts/DotNet/Core/Entity/EntityHelper.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-namespace ET
-{
- public static class EntityHelper
- {
- public static int Zone(this Entity entity)
- {
- return entity.IScene.Fiber.Zone;
- }
-
- public static Scene Scene(this Entity entity)
- {
- return entity.IScene as Scene;
- }
-
- public static T Scene(this Entity entity) where T: class, IScene
- {
- return entity.IScene as T;
- }
-
- public static Scene Root(this Entity entity)
- {
- return entity.IScene.Fiber.Root;
- }
-
- public static Fiber Fiber(this Entity entity)
- {
- return entity.IScene.Fiber;
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/GameScripts/DotNet/Core/Entity/EntityHelper.cs.meta b/Assets/GameScripts/DotNet/Core/Entity/EntityHelper.cs.meta
deleted file mode 100644
index f89547c1..00000000
--- a/Assets/GameScripts/DotNet/Core/Entity/EntityHelper.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 3ac02684a9489804d80e99f7ae99b548
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameScripts/DotNet/Core/Entity/EntityRef.cs b/Assets/GameScripts/DotNet/Core/Entity/EntityRef.cs
deleted file mode 100644
index a0713233..00000000
--- a/Assets/GameScripts/DotNet/Core/Entity/EntityRef.cs
+++ /dev/null
@@ -1,103 +0,0 @@
-using System;
-
-namespace ET
-{
- public readonly struct EntityRef where T: Entity
- {
- private readonly long instanceId;
- private readonly T entity;
-
- private EntityRef(T t)
- {
- if (t == null)
- {
- this.instanceId = 0;
- this.entity = null;
- return;
- }
- this.instanceId = t.InstanceId;
- this.entity = t;
- }
-
- private T UnWrap
- {
- get
- {
- if (this.entity == null)
- {
- return null;
- }
- if (this.entity.InstanceId != this.instanceId)
- {
- return null;
- }
- return this.entity;
- }
- }
-
- public static implicit operator EntityRef(T t)
- {
- return new EntityRef(t);
- }
-
- public static implicit operator T(EntityRef v)
- {
- return v.UnWrap;
- }
- }
-
-
- public struct EntityWeakRef where T: Entity
- {
- private long instanceId;
- // 使用WeakReference,这样不会导致entity dispose了却无法gc的问题
- // 不过暂时没有测试WeakReference的性能
- private readonly WeakReference weakRef;
-
- private EntityWeakRef(T t)
- {
- if (t != null)
- {
- this.instanceId = 0;
- this.weakRef = null;
- return;
- }
- this.instanceId = t.InstanceId;
- this.weakRef = new WeakReference(t);
- }
-
- private T UnWrap
- {
- get
- {
- if (this.instanceId == 0)
- {
- return null;
- }
-
- if (!this.weakRef.TryGetTarget(out T entity))
- {
- this.instanceId = 0;
- return null;
- }
-
- if (entity.InstanceId != this.instanceId)
- {
- this.instanceId = 0;
- return null;
- }
- return entity;
- }
- }
-
- public static implicit operator EntityWeakRef(T t)
- {
- return new EntityWeakRef(t);
- }
-
- public static implicit operator T(EntityWeakRef v)
- {
- return v.UnWrap;
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/GameScripts/DotNet/Core/Entity/EntityRef.cs.meta b/Assets/GameScripts/DotNet/Core/Entity/EntityRef.cs.meta
deleted file mode 100644
index bfdfbaae..00000000
--- a/Assets/GameScripts/DotNet/Core/Entity/EntityRef.cs.meta
+++ /dev/null
@@ -1,3 +0,0 @@
-fileFormatVersion: 2
-guid: ef22211834964fd8aced938aa4307f76
-timeCreated: 1683206917
\ No newline at end of file
diff --git a/Assets/GameScripts/DotNet/Core/Entity/EntitySceneFactory.cs b/Assets/GameScripts/DotNet/Core/Entity/EntitySceneFactory.cs
deleted file mode 100644
index a7a1d452..00000000
--- a/Assets/GameScripts/DotNet/Core/Entity/EntitySceneFactory.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-namespace ET
-{
- public static class EntitySceneFactory
- {
- public static Scene CreateScene(Entity parent, long id, long instanceId, SceneType sceneType, string name)
- {
- Scene scene = new(parent.Fiber(), id, instanceId, sceneType, name);
- parent?.AddChild(scene);
- return scene;
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/GameScripts/DotNet/Core/Entity/EntitySceneFactory.cs.meta b/Assets/GameScripts/DotNet/Core/Entity/EntitySceneFactory.cs.meta
deleted file mode 100644
index 906680a3..00000000
--- a/Assets/GameScripts/DotNet/Core/Entity/EntitySceneFactory.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 91cb0fe18962a644b8760cf0191d3da3
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameScripts/DotNet/Core/Entity/EntitySystemAttribute.cs b/Assets/GameScripts/DotNet/Core/Entity/EntitySystemAttribute.cs
deleted file mode 100644
index dd2cc907..00000000
--- a/Assets/GameScripts/DotNet/Core/Entity/EntitySystemAttribute.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using System;
-
-namespace ET
-{
- [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
- public class EntitySystemAttribute: BaseAttribute
- {
- }
-}
\ No newline at end of file
diff --git a/Assets/GameScripts/DotNet/Core/Entity/EntitySystemAttribute.cs.meta b/Assets/GameScripts/DotNet/Core/Entity/EntitySystemAttribute.cs.meta
deleted file mode 100644
index 56c5f03e..00000000
--- a/Assets/GameScripts/DotNet/Core/Entity/EntitySystemAttribute.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: da6ad6e58e6b617428d5fa989149b624
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameScripts/DotNet/Core/Entity/EntitySystemSingleton.cs b/Assets/GameScripts/DotNet/Core/Entity/EntitySystemSingleton.cs
deleted file mode 100644
index 48a9e54c..00000000
--- a/Assets/GameScripts/DotNet/Core/Entity/EntitySystemSingleton.cs
+++ /dev/null
@@ -1,302 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace ET
-{
- public class EntitySystemSingleton: SingletonLock, ISingletonAwake
- {
- public TypeSystems TypeSystems { get; private set; }
-
- public void Awake()
- {
- this.TypeSystems = new TypeSystems(InstanceQueueIndex.Max);
-
- foreach (Type type in EventSystem.Instance.GetTypes(typeof (EntitySystemAttribute)))
- {
- object obj = Activator.CreateInstance(type);
-
- if (obj is ISystemType iSystemType)
- {
- TypeSystems.OneTypeSystems oneTypeSystems = this.TypeSystems.GetOrCreateOneTypeSystems(iSystemType.Type());
- oneTypeSystems.Map.Add(iSystemType.SystemType(), obj);
- int index = iSystemType.GetInstanceQueueIndex();
- if (index > InstanceQueueIndex.None && index < InstanceQueueIndex.Max)
- {
- oneTypeSystems.QueueFlag[index] = true;
- }
- }
- }
- }
-
- public override void Load()
- {
- World.Instance.AddSingleton(true);
- }
-
- public void Serialize(Entity component)
- {
- if (component is not ISerialize)
- {
- return;
- }
-
- List