[+] 接入ET8服务端

[+] 接入ET8服务端
This commit is contained in:
ALEXTANG
2023-07-13 12:23:48 +08:00
parent e0be062006
commit 336d4b2eb9
1316 changed files with 130657 additions and 626 deletions

View File

@@ -0,0 +1,54 @@
using System.Diagnostics;
using MongoDB.Bson.Serialization.Attributes;
namespace ET
{
[EnableMethod]
[ChildOf]
public class Scene: Entity, IScene
{
[BsonIgnore]
public Fiber Fiber { get; set; }
public string Name { get; }
public SceneType SceneType
{
get;
set;
}
public Scene()
{
}
public Scene(Fiber fiber, long id, long instanceId, SceneType sceneType, string name)
{
this.Id = id;
this.Name = name;
this.InstanceId = instanceId;
this.SceneType = sceneType;
this.IsCreated = true;
this.IsNew = true;
this.Fiber = fiber;
this.IScene = this;
this.IsRegister = true;
Log.Info($"scene create: {this.SceneType} {this.Id} {this.InstanceId}");
}
public override void Dispose()
{
base.Dispose();
Log.Info($"scene dispose: {this.SceneType} {this.Id} {this.InstanceId}");
}
protected override string ViewName
{
get
{
return $"{this.GetType().Name} ({this.SceneType})";
}
}
}
}