mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 10:46:17 +00:00
优化属性更新逻辑
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using JNGame.Sync.Entity;
|
||||
using JNGame.Sync.Frame.Entity;
|
||||
using JNGame.Sync.Frame.Entity.Components;
|
||||
using JNGame.Sync.State.Tile.Entity.Component;
|
||||
using JNGame.Sync.System.Data;
|
||||
@@ -86,8 +87,27 @@ namespace JNGame.Sync.State.Tile.Entity
|
||||
|
||||
public abstract void TileSyncData(ISTileData data);
|
||||
|
||||
public override void OnInit(IJNContext context, ulong id = 0)
|
||||
{
|
||||
base.OnInit(context, id);
|
||||
|
||||
//如果不是Tile系统则直接拥有权限
|
||||
if (Context.GetSync() is not JNSSTileServerService)
|
||||
{
|
||||
IsHost = true;
|
||||
IsSelfCreate = true;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void HostUpdate()
|
||||
{
|
||||
|
||||
//如果不是Tile系统则直接返回
|
||||
if (Context.GetSync() is not JNSSTileServerService)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
bool isContains = SyncTile.IsContains(Position);
|
||||
bool isHost = IsHost;
|
||||
|
||||
|
Reference in New Issue
Block a user