public void SetRandomFriendData( body2_SC_FRIEND_RANDOM Data) { m_nUserUniqKey = Data.nUserUniqKey; m_szCharName = Data.szCharName; m_NickName.Text = string.Format( "Lv.{0} {1}", Data.nLevel, Data.szCharName); SetDelegateImage(Data.nImageIndex); }
public void InsertFriendData( body2_SC_FRIEND_RANDOM listData) { UIListItem item = m_list.CreateItem( m_objChoiceItem) as UIListItem; AsRandomItem baseFriendItem = item.gameObject.GetComponent<AsRandomItem>(); if( null == baseFriendItem) return; baseFriendItem.SetRandomFriendData( listData); }
public void PacketBytesToClass( byte[] data, int index) { Type infotype = this.GetType(); FieldInfo headerinfo; // nCnt headerinfo = infotype.GetField ( "nCnt", BINDING_FLAGS_PIG); headerinfo.SetValue( this, data[ index++]); // nMaxPage headerinfo = infotype.GetField ( "nMaxPage", BINDING_FLAGS_PIG); headerinfo.SetValue( this, data[ index++]); if( 0 < nCnt) { body = new body2_SC_FRIEND_RANDOM[nCnt]; for ( int i = 0; i < nCnt; i++) { body[i] = new body2_SC_FRIEND_RANDOM(); index = body[i].PacketBytesToClass( data, index); } } }