コード例 #1
0
    void Start()
    {
        string displayingString = DisposingTime > 0 ? DisposingTime.ToString() : $"Disposing Time cannot be negative number.";

        Dbg.LogE($"Current Disposing Counter is [{displayingString}]");
        Player = GameObject.Find("LocalPlayer").transform;
    }
コード例 #2
0
ファイル: Stage1Rule.cs プロジェクト: olcw78/Raid_Graduate
    //IEnumerator LoadMenu()
    //{
    //    enabled = false;
    //    yield return SceneManager.LoadSceneAsync("Stage1Menu", LoadSceneMode.Additive);
    //    SceneManager.SetActiveScene(SceneManager.GetSceneByName("Stage1Menu"));
    //    enabled = true;
    //}

    void LoadStage()
    {
        if (false == PhotonNetwork.IsMasterClient)
        {
            Dbg.LogE($"Trying to load a level but we are not the master client.");
        }
        PhotonNetwork.LoadLevel("Stage1");
    }
コード例 #3
0
ファイル: UIPassword.cs プロジェクト: olcw78/Raid_Graduate
 /// <summary>
 ///
 /// </summary>
 /// <param name="inputField"></param>
 public void OnSetPlayerPassword(InputField inputField)
 {
     if (string.IsNullOrEmpty(inputField.text))
     {
         Dbg.LogE("Player Password is null or empty.");
         return;
     }
     Dbg.Log($"{inputField.text}");
     PlayerPrefs.SetString(PlayerPasswordPrefKey, inputField.text);
     PlayerPrefs.Save();
 }
コード例 #4
0
    void Start()
    {
        DontDestroyOnLoad(this.gameObject);

        AppSettings = PhotonNetwork.PhotonServerSettings.AppSettings;
        bool isAppIDpresent = !string.IsNullOrEmpty(AppSettings.AppIdChat);

        if (!isAppIDpresent)
        {
            Dbg.LogE("Chat ID is missing.");
        }
    }
コード例 #5
0
ファイル: UIUsername.cs プロジェクト: olcw78/Raid_Graduate
    /// <summary>
    /// Sets the name of the player, and save it in the PlayerPrefs for future session.
    /// </summary>
    /// <param name="name"></param>
    public void OnSetPlayerName(InputField inputField)
    {
        if (string.IsNullOrEmpty(inputField.text))
        {
            Dbg.LogE("Player Name is empty.");
            return;
        }
        Dbg.Log($"{inputField.text}");
        PhotonNetwork.NickName = inputField.text;

        PlayerPrefs.SetString(PlayerNamePrefKey, inputField.text);
        PlayerPrefs.Save();
    }
コード例 #6
0
    public static void RegisterEvent(EventSet evt)
    {
        if (true == IsInvoking)
        {
            return;
        }

        if (Utils.IsNull(evt))
        {
            Dbg.LogE($"Logic Event Tuple is null. Check RegisterEvent()");
        }
        logicEventSet.Add(evt);
    }