Beispiel #1
0
    /// <summary>
    /// Start is called on the frame when a script is enabled just before
    /// any of the Update methods is called the first time.
    /// </summary>
    void Start()
    {
        winnerPID  = "";
        winnerAdrs = "";
        winnerName = "";


        _playfabUser = FindObjectOfType <PlayfabUser>();


        Debug.Log(_playfabUser.Instance.Address + "\n" + _playfabUser.Instance.PrivateKey);

        /*EtherTransferCoroutinesUnityWebRequest eth = GameObject.FindGameObjectWithTag("ETH")
         *  .GetComponent<EtherTransferCoroutinesUnityWebRequest>(); */

        eth = FindObjectOfType <EtherTransferCoroutinesUnityWebRequest>();


        fpController  = GetComponent <FirstPersonController>();
        ikControl     = GetComponentInChildren <IKControl>();
        damageImage   = GameObject.FindGameObjectWithTag("Screen").transform.Find("DamageImage").GetComponent <Image>();
        healthSlider  = GameObject.FindGameObjectWithTag("Screen").GetComponentInChildren <Slider>();
        currentHealth = startingHealth;
        if (photonView.IsMine)
        {
            gameObject.layer   = LayerMask.NameToLayer("FPSPlayer");
            healthSlider.value = currentHealth;
        }
        damaged   = false;
        isDead    = false;
        isSinking = false;
    }
    private void Awake()
    {
        if (instance != null && instance != this)
        {
            Destroy(this.gameObject);
        }

        instance = this;
        DontDestroyOnLoad(this.gameObject);
    }
Beispiel #3
0
 private void Start()
 {
     _playfabUser = FindObjectOfType <PlayfabUser>();
     GetUserData();
 }
Beispiel #4
0
 private void Start()
 {
     _playfabUser            = FindObjectOfType <PlayfabUser>();
     loginUsernameField.text = GetSavedUsername();
 }