Esempio n. 1
0
        IEnumerator PickItem(GameObject who)
        {
            PickItemFromNetwork(who);

            var cg = CGPlayerCmd.CreateBuilder();

            cg.Cmd = "Pick";
            var pickAction = PickItemAction.CreateBuilder();

            pickAction.Id      = netView.GetServerID();
            pickAction.ItemId  = itemData.ObjectId;
            pickAction.ItemNum = num;
            pickAction.Who     = who.GetComponent <KBEngine.KBNetworkView>().GetServerID();
            cg.PickAction      = pickAction.Build();
            NetworkUtil.Broadcast(cg);
            NetworkUtil.RemoveEntityToNetwork(netView);

            yield break;
        }