Example #1
0
    void Awake()
    {
        monk  = GameObject.FindGameObjectWithTag("Player").GetComponent <MonkSkill>();
        barba = GameObject.FindGameObjectWithTag("Player").GetComponent <BarbarianSkill>();

        pv = GetComponent <PhotonView>();
    }
Example #2
0
    private void Awake()
    {
        _instance = this;
        //equipmentManager = GameObject.Find("EquipmentManager").GetComponent<EquipmentManager>();
        //weaponColliders = weaponPos.GetComponentsInChildren<Collider>();

        myRb = GetComponent <Rigidbody>();

        pv = GetComponent <PhotonView>();

        pv.ObservedComponents[0] = this;

        pv.synchronization = ViewSynchronization.UnreliableOnChange;

        anim = gameObject.GetComponentInChildren <Animator>();



        if (pv.isMine)
        {
            Camera.main.GetComponent <SmoothFollow>().target = camPivot;
        }
        else
        {
            myRb.isKinematic = true;
        }
        currPos = this.transform.position;
        currRot = this.transform.rotation;
    }