protected override YxBaseGameUserInfo OnInitUser(ISFSObject userData) { PludoPlayerInfo baseGameUserInfo = new PludoPlayerInfo(); baseGameUserInfo.Parse(userData); baseGameUserInfo.CheckRoomOwner(OwnersId.ToString()); return(baseGameUserInfo); }
protected override void FreshUserInfo() { base.FreshUserInfo(); CurInfo = GetData <PludoPlayerInfo>(); if (CurInfo != null) { Control = ControlCenter.RelatePlayer(CurInfo.PlayerColor); Control.name = CurInfo.PlayerColor.ToString(); if (Control) { Control.UpdateView(CurInfo); } StarScore.TrySetComponentValue(string.Format(StarScoreFormat, CurInfo.StarNum)); if (PludoColorItem) { var colorData = new ColorItemData(CurInfo.PlayerColor); PludoColorItem.UpdateView(colorData); } ShowOpWithCd(); RoomOwnerFlag.TrySetComponentValue(CurInfo.IsOwner); AutoFlag.TrySetComponentValue(CurInfo.IsAuto); } }
public void Reset(int data) { CurInfo = null; }