コード例 #1
0
ファイル: UIRoom_Component.cs プロジェクト: suziye123/MyET
        public void Awake()
        {
            ReferenceCollector rc = this.GetParent <UI>().GameObject.GetComponent <ReferenceCollector>();

            txt_GamePlayerSetting = rc.GetComponent <Text>("txt_GamePlayerSetting");
            txt_GameCountSetting  = rc.GetComponent <Text>("txt_GameCountSetting");
            txt_RoomIdSetting     = rc.GetComponent <Text>("txt_RoomIdSetting");
            btn_ReturnLobby       = rc.GetComponent <Button>("btn_Exit");
            Panel_PlayerOopertate = rc.Get <GameObject>("PlayerOperate");
            for (int i = 0; i < GameTools.GetPlayerCount(); i++)
            {
                PlayerPukes.Add(rc.Get <GameObject>($"Puke{i}"));
            }
            for (int i = 0; i < GameTools.GetPlayerCount(); i++)
            {
                PlayerObj.Add(rc.Get <GameObject>($"Player{i}"));
            }
            this.btn_ReturnLobby.onClick.AddListener(OnReturnLobby);
            InitRoomInfo();
        }