예제 #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
파일: SyncObject.cs 프로젝트: ZRace/ZRace
 /// <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);
     }
 }