public override void OnStartAuthority()
    {
        if (hasAuthority && GetComponent <PlayerControl>())
        {
            updateUI = GameObject.Find("PlayerUI").GetComponent <UpdateUIRefrence>().updateUI;
            updateUI.refrenceKeeper = this;
            updateUI.OpenClose();

            isPlayer = true;
        }
        else
        {
            isPlayer = false;
        }
    }
Beispiel #2
0
    void Update()
    {
        if (Input.GetKeyDown("e"))
        {
            e = true;
        }
        if (Input.GetKeyUp("e"))
        {
            e = false;
        }

        if (Input.GetKeyDown("i"))
        {
            i = true;
            updateUI.OpenClose();
        }
        if (Input.GetKeyUp("i"))
        {
            i = false;
        }
    }