mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 10:46:17 +00:00
提交bug 艰难先这样
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user