void Start() { guess_TBtns = transform.Find("66").gameObject; Debug.Log("+++++++++++++++++++" + guess_TBtns.transform.Find("1").GetSiblingIndex()); Image cardSelected = GetComponent <Image>(); seletedCard = cardSelected; //cardSelected.color = new Color(0.5f, 0.5f, 0.5f, 1); Debug.Log(transform.childCount); //transform.GetChild(0).GetChild(0).gameObject.SetActive(true); Debug.Log(transform.GetChild(0).GetChild(0).name); transform.Find("66/1").GetComponent <Image>().enabled = true; MyClass myClass = new MyClass { ID = 1, Name = "沙克", }; MyClass myClass1 = DataDo.Json2Object <MyClass>(DataDo.Object2Json(myClass)); Debug.Log(myClass1.ID + myClass1.Name + myClass.Card); Test(); Toggletest(); }
/// <summary> /// 发送单摸结果 /// </summary> public static void SendLineCardIndexs(List <LineCardMoveInfo> lineCardMoveInfos) { Info info = new Info(DataDo.Object2Json(lineCardMoveInfos)); byte[] byt = Incode.IncodeSecondaryCommand(TYPE, (int)SecondCommands.MoveLineCardInFirstDraw, DataDo.Object2Json(info)); NetStart.SendContend(byt); Debug.Log("--------SendLineCardIndexs---------"); }
/// <summary> /// 发送猜牌时的结果 /// </summary> public static void SendGuessCard(GuessInfo guessInfo) { byte[] byt = Incode.IncodeSecondaryCommand(TYPE, (int)SecondCommands.GUESS, DataDo.Object2Json(guessInfo)); NetStart.SendContend(byt); }
/// <summary> /// 发送单摸结果 /// </summary> public static void SendSingleDrow(int secondCommands, SingleDraw singleDraw) { byte[] byt = Incode.IncodeSecondaryCommand(TYPE, secondCommands, DataDo.Object2Json(singleDraw)); NetStart.SendContend(byt); }
/// <summary> /// 发送手牌选择(开局首摸) /// </summary> public static void SendSeletFirstHandCards(SelectCards selectCards) { byte[] byt = Incode.IncodeSecondaryCommand(TYPE, (int)SecondCommands.DEAL, DataDo.Object2Json(selectCards)); NetStart.SendContend(byt); }
public static void Registe_Send(LoginInfo info) { NetStart.SendContend(Incode.IncodeFirstCommand(TYPE, DataDo.Object2Json <LoginInfo>(info))); }
public static void Send(MessageInfo message) { NetStart.SendContend(Incode.IncodeSecondaryCommand(TYPE, PrivateChat, DataDo.Object2Json(message))); }
/// <summary> /// 退出房间 /// </summary> /// <param name="roomNum">房间号</param> public static void ExitRoom(string roomNum, int peopleId) { RoomMsg roomMsg = new RoomMsg { roomNum = roomNum, otherId = peopleId, }; byte[] byt = Incode.IncodeSecondaryCommand(TYPE, (int)SecondCommands.EXITROOM, DataDo.Object2Json(roomMsg)); NetStart.SendContend(byt); }
/// <summary> /// 加入房间 /// </summary> /// <param name="roomNum">房间号</param> public static void JoinRoom(string roomNum, PersonalInfo my) { RoomMsg roomMsg = new RoomMsg { roomNum = roomNum, my = my, }; byte[] byt = Incode.IncodeSecondaryCommand(TYPE, (int)SecondCommands.JOINROOM, DataDo.Object2Json(roomMsg)); NetStart.SendContend(byt); }
/// <summary> /// 战斗结束后返回房间界面 /// </summary> /// <param name="roomNum">房间号</param> public static void TurnBackCurrRoom(string roomNum) { Info info = new Info { myId = NetStart.myInfo.id, roomId = roomNum, content = new byte[0] }; byte[] byt = Incode.IncodeSecondaryCommand(TYPE, (int)SecondCommands.TurnBackROOM, DataDo.Object2Json(info)); NetStart.SendContend(byt); }
/// <summary> /// 开房 /// </summary> /// <param name="room"></param> public static void CreatRoom(RoomInfo room) { byte[] byt = Incode.IncodeSecondaryCommand(TYPE, (int)SecondCommands.CREATEROOM, DataDo.Object2Json(room)); NetStart.SendContend(byt); }
public byte[] MyIncode() { return(Incode.IncodeFirstCommand(type, DataDo.Object2Json <LoginInfo>(info))); }