Пример #1
0
 public override void SetLeftWeapon(GameObject weapon)
 {
     base.SetLeftWeapon(weapon);
     if (GetComponent <PhotonView>().IsMine == true)
     {
         GetComponent <PhotonView>().RPC(
             "MeleeManager_ReceiveSetLeftWeapon",
             RpcTarget.Others,
             (weapon) ? StaticMethods.BuildChildTree(transform, weapon.transform, false) : new int[] { }
             );
     }
 }
Пример #2
0
 /// <summary>
 /// Builds the index tree to the root of this tree and finds the parent `PhotonView` component.
 /// </summary>
 protected virtual void Awake()
 {
     if (!view)
     {
         if (GetComponent <PhotonView>())
         {
             view = GetComponent <PhotonView>();
         }
         else if (transform.GetComponentInParent <PhotonView>())
         {
             view = transform.GetComponentInParent <PhotonView>();
         }
     }
     if (view.IsMine == true)
     {
         toParentTree = StaticMethods.BuildChildTree(transform.root, this.transform.parent, debugging);
         treeToThis   = StaticMethods.BuildChildTree(transform.root, this.transform, debugging);
     }
 }