public static void RemoveEntityToNetwork(KBEngine.KBNetworkView view) { var cg = CGPlayerCmd.CreateBuilder(); var ety = EntityInfo.CreateBuilder(); ety.Id = view.GetServerID(); cg.EntityInfo = ety.Build(); cg.Cmd = "RemoveEntity"; NetworkUtil.Broadcast(cg); }
//增加一个玩家实体对象 public void AddObject(long unitId, KBEngine.KBNetworkView view) { photonViewList.Add(view); }
void Awake() { netView = gameObject.AddMissingComponent <KBEngine.KBNetworkView>(); }