예제 #1
0
 public void OnUpdateItems(int idx, GameObject obj)
 {
     if (idx < 0 || idx >= this.m_Max)
     {
         obj.SetActive(false);
     }
     else
     {
         obj.SetActive(true);
         DataSource.Bind <MyPhoton.MyRoom>(obj, this.m_Rooms[idx]);
         VersusViewRoomInfo component = (VersusViewRoomInfo)obj.GetComponent <VersusViewRoomInfo>();
         if (!Object.op_Inequality((Object)component, (Object)null))
         {
             return;
         }
         component.Refresh();
     }
 }
        private void Refresh(MyPhoton.MyRoom room = null)
        {
            GameManager instance = MonoSingleton <GameManager> .Instance;

            if (!Object.op_Inequality((Object)this.RoomObj, (Object)null) || instance.AudienceRoom == null)
            {
                return;
            }
            DataSource.Bind <MyPhoton.MyRoom>(this.RoomObj, room == null ? instance.AudienceRoom : room);
            VersusViewRoomInfo component = (VersusViewRoomInfo)this.RoomObj.GetComponent <VersusViewRoomInfo>();

            if (Object.op_Inequality((Object)component, (Object)null))
            {
                component.Refresh();
            }
            if (!Object.op_Inequality((Object)this.AudienceTxt, (Object)null))
            {
                return;
            }
            this.AudienceTxt.set_text(string.Format(LocalizedText.Get("sys.MULTI_VERSUS_AUDIENCE_NUM"), (object)GameUtility.HalfNum2FullNum(instance.AudienceRoom.audience.ToString()), (object)GameUtility.HalfNum2FullNum(instance.AudienceRoom.audienceMax.ToString())));
        }