Просмотр исходного кода

GameObject多余,不需要这一层

tanghai 11 лет назад
Родитель
Сommit
6ae9900728

+ 3 - 2
CSharp/Game/Model/Buff.cs

@@ -1,8 +1,9 @@
-using MongoDB.Bson.Serialization.Attributes;
+using Common.Base;
+using MongoDB.Bson.Serialization.Attributes;
 
 namespace Model
 {
-    public class Buff: GameObject<Buff>
+    public class Buff: Entity<Buff>
     {
         [BsonElement]
         private int configId { get; set; }

+ 0 - 8
CSharp/Game/Model/GameObject.cs

@@ -1,8 +0,0 @@
-using Common.Base;
-
-namespace Model
-{
-    public abstract class GameObject<K>: Entity<K> where K : Entity<K>
-    {
-    }
-}

+ 0 - 1
CSharp/Game/Model/Model.csproj

@@ -63,7 +63,6 @@
     <Compile Include="IFactory.cs" />
     <Compile Include="Component\UnitComponent.cs" />
     <Compile Include="BuffType.cs" />
-    <Compile Include="GameObject.cs" />
     <Compile Include="Config\GlobalConfig.cs" />
     <Compile Include="Config\NodeConfig.cs" />
     <Compile Include="Unit.cs" />

+ 3 - 2
CSharp/Game/Model/Unit.cs

@@ -1,8 +1,9 @@
-using MongoDB.Bson.Serialization.Attributes;
+using Common.Base;
+using MongoDB.Bson.Serialization.Attributes;
 
 namespace Model
 {
-    public class Unit : GameObject<Unit>
+    public class Unit : Entity<Unit>
     {
         [BsonElement]
         public int configId { get; set; }

+ 1 - 1
CSharp/Game/Model/World.cs

@@ -4,7 +4,7 @@ using Common.Base;
 
 namespace Model
 {
-    public class World : GameObject<World>
+    public class World : Entity<World>
     {
         private static readonly World instance = new World();