提交bug 艰难先这样

This commit is contained in:
PC-20230316NUNE\Administrator
2024-08-22 20:37:39 +08:00
parent 5858bd2407
commit 8932528f5e
118 changed files with 5271 additions and 4939 deletions

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using JNGame.Sync.Entity;
using JNGame.Sync.Frame.Entity;
using JNGame.Sync.Frame.Entity.Components;
using UnityEngine;
namespace JNGame.Sync.State.Tile.Entity
{
@@ -44,6 +45,17 @@ namespace JNGame.Sync.State.Tile.Entity
public T TileSyncCreate(long id)
{
//判断是否有这个Id实体
foreach (var data in GetEntities())
{
if (data.Id == id)
{
Debug.Log("重复Id实体创建");
return null;
}
}
var entity = NewEntity();
entity.OnInit(this,id);
entity.IsHost = false;