コード例 #1
0
        void Start()
        {
            BGM_SE_Manager = GameObject.Find("BGM_SE_Manager");
            BGM_SE_MSC     = BGM_SE_Manager.GetComponent <BGM_SE_Manager>();

            //EntryCheck();
            Debug.Log("TestRoomController 出席確認");
            allPlayers = PhotonNetwork.PlayerList; // プレイヤーの配列(自身を含む)
            Debug.Log(allPlayers.Length + ": allPlayers.Length");
            SelectJankenMSC = SelectJankenManager.GetComponent <SelectJanken>();

            /*
             * Text_PName1 = Text_PName1.GetComponent<Text>();
             * Text_PName2 = Text_PName2.GetComponent<Text>();
             * Text_PName3 = Text_PName3.GetComponent<Text>();
             * Text_PName4 = Text_PName4.GetComponent<Text>();
             */
            UpdateMemberList();
            string_PName1 = allPlayers[0].NickName;
            Debug.Log(string_PName1 + ": string_PName1");
            string_PID1 = allPlayers[0].UserId;
            Debug.Log(string_PID1 + ": string_PID1");
            SelectJankenMSC.Share_AcutivePlayerID();
            EntryCheck();
            PNameCheck();
            Set_PNameTextAll();
            //ToSet_MyHeadName();
        }
コード例 #2
0
ファイル: CLauncherScript.cs プロジェクト: ef41614/JankenPyon
    private void Awake()
    {
        Debug.Log("****** CLauncherScript Awake **");
        Debug.Log(" firstPush : " + firstPush);
        Debug.Log(" PhotonNetwork.IsConnected : " + PhotonNetwork.IsConnected);
        BGM_SE_Manager = GameObject.Find("BGM_SE_Manager");
        BGM_SE_MSC     = BGM_SE_Manager.GetComponent <BGM_SE_Manager>();

        firstPush = false;             //初期化
        if (PhotonNetwork.IsConnected) // 2週目以降で既にルームに入室していたら
        {
            Debug.Log("ルームに入っていたので、一旦退出します");
            PhotonNetwork.Disconnect();
            //PhotonNetwork.LeaveRoom();
            Debug.Log("ルームから退出しました");
        }
        else
        {
            Debug.Log("今、ルームには入っていません");
        }
        Debug.Log(" firstPush : " + firstPush);
        Debug.Log(" PhotonNetwork.IsConnected : " + PhotonNetwork.IsConnected);
        //BGM_SE_Manager = GameObject.Find("BGM_SE_Manager");
        //Volume_Panel = GameObject.Find("Volume_Panel");
        //Credit_Panel = GameObject.Find("Credit_Panel");
    }
コード例 #3
0
 void Start()
 {
     Debug.Log("あいことばをリセットする");
     BGM_SE_MSC          = BGM_SE_Manager.GetComponent <BGM_SE_Manager>();
     BGM_SE_MSC.Aikotoba = "";  // あいことばをリセットする
     _inputField         = this.GetComponent <InputField>();
     CloseAikotoba_OK_Button();
     _inputField.text = "";
 }
コード例 #4
0
 private void Awake()
 {
     Debug.Log("ShuffleCards Awake 出席確認はじめ");
     ClosePanel_To_Defalt();   // 不要なパネルを閉じて、デフォルト状態にする
     SelectJankenMSC      = SelectJankenManager.GetComponent <SelectJanken>();
     TestRoomControllerSC = TestRoomController.GetComponent <TestRoomController>();
     BGM_SE_Manager       = GameObject.Find("BGM_SE_Manager");
     BGM_SE_MSC           = BGM_SE_Manager.GetComponent <BGM_SE_Manager>();
     Debug.Log("ShuffleCards Awake 出席確認おわり");
 }
コード例 #5
0
ファイル: CLauncherScript.cs プロジェクト: ef41614/JankenPyon
    //ログインボタンを押したときに実行される
    public void Connect()     // 「ランダムマッチ」ボタンを押した時の処理
    {
        BGM_SE_Manager = GameObject.Find("BGM_SE_Manager");
        BGM_SE_MSC     = BGM_SE_Manager.GetComponent <BGM_SE_Manager>();

        Debug.Log("CLauncherScript で「Play」が押されました。");
        Debug.Log(" firstPush : " + firstPush);
        Debug.Log(" PhotonNetwork.IsConnected : " + PhotonNetwork.IsConnected);
        BGM_SE_MSC.Aikotoba = "";  // あいことばをリセットする

        if (!firstPush)
        {
            Debug.Log("Connect 処理中");
            Debug.Log("PhotonNetwork.NickName Play:" + PhotonNetwork.NickName);
            if (string.IsNullOrWhiteSpace(PhotonNetwork.NickName))
            {
                Debug.Log("名前が空欄なので、名前をランダムに決めて入力します");
                int RndPName = UnityEngine.Random.Range(1, 10000);
                PhotonNetwork.NickName = "JKP_" + RndPName;     //今回ゲームで利用するプレイヤーの名前を設定
                Debug.Log("PhotonNetwork.NickName ランチャー:" + PhotonNetwork.NickName);
            }
            else    //名前が正常に入力されていたら
            {
                /*
                 * if (!PhotonNetwork.IsConnected)             //Photonに接続できていなければ
                 * {
                 *  Debug.Log("Photonに接続をします");
                 *  PhotonNetwork.ConnectUsingSettings();   //Photonに接続する
                 *  Debug.Log("Photonに接続しました。");
                 *  Debug.Log("ロビーに移動します。");
                 *  SceneManager.LoadScene("Mike");
                 * }
                 * else
                 * {
                 *  Debug.Log("エラーのようです");
                 * }
                 */
            }
            BGM_SE_MSC.Stop_BGM();
            SceneManager.LoadScene("Mike");
            firstPush = true; //ボタン押下済みフラグ
        }
        else
        {
            Debug.Log("Connect 処理に失敗しました");
        }
        Debug.Log(" firstPush : " + firstPush);
        Debug.Log(" PhotonNetwork.IsConnected : " + PhotonNetwork.IsConnected);
    }
コード例 #6
0
ファイル: PhotonManager.cs プロジェクト: ef41614/JankenPyon
    private void Start()
    {
        Debug.Log("PhotonManager 出席確認");
        BGM_SE_Manager = GameObject.Find("BGM_SE_Manager");
        BGM_SE_MSC     = BGM_SE_Manager.GetComponent <BGM_SE_Manager>();
        BGM_SE_MSC.SasazukaHighwayPark_BGM();

        Debug.Log("あいことばを確認します");
        Debug.Log("あいことばは「 " + BGM_SE_MSC.Aikotoba + " 」です");
        Debug.Log("あいことばを確認しました");

        Set_initial_Parameters();               // ランダムマッチ用のルーム名を作成します
        SetOnline_ToStart();                    // ConnectPhoton 処理を実行します
        //RandomMatching();
    }
コード例 #7
0
ファイル: BGM_SE_Manager.cs プロジェクト: ef41614/JankenPyon
    public string Aikotoba = "";  // あいことば(ルーム名になる)


    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
            DontDestroyOnLoad(this.gameObject);
        }
        else
        {
            Destroy(this.gameObject);
        }
        audioSource     = GetComponent <AudioSource>();
        loopAudioSource = GetComponent <AudioSource>();
        //stage_No = UnityEngine.Random.Range(0, 2);      // Battle ステージ
    }
コード例 #8
0
 void Start()
 {
     slider         = GetComponent <Slider>();
     BGM_SE_Manager = FindObjectOfType <BGM_SE_Manager>();
 }