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;
    }
Beispiel #2
0
    //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");
    }
Beispiel #3
0
 /// <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();
 }
Beispiel #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.");
        }
    }
Beispiel #5
0
    /// <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();
    }
    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);
    }