Пример #1
0
    public void sendArrowMP(GameObject fakeArrow, int closestJointIndex, WeaponStatUpgrade.Types arrowBonus = (WeaponStatUpgrade.Types)(-1), bool crossbow = false)
    {
        stuckArrowsSync stuckArrowsSync = stuckArrowsSync.Create(GlobalTargets.Others);
        BoltEntity      component       = base.transform.root.GetComponent <BoltEntity>();

        if (component)
        {
        }
        stuckArrowsSync.target = component;
        stuckArrowsSync.pos    = fakeArrow.transform.localPosition;
        stuckArrowsSync.rot    = fakeArrow.transform.localRotation;
        if (arrowBonus == WeaponStatUpgrade.Types.BoneAmmo)
        {
            stuckArrowsSync.type = 1;
        }
        if (crossbow)
        {
            stuckArrowsSync.type = 2;
        }
        stuckArrowsSync.index = closestJointIndex;
        if (stuckArrowsSync.target)
        {
            stuckArrowsSync.Send();
        }
    }
Пример #2
0
 private void sendRemoveArrow()
 {
     if (BoltNetwork.isRunning)
     {
         if (this.entityTarget == null)
         {
             this.entityTarget = base.transform.root.GetComponent <BoltEntity>();
         }
         if (this.entityTarget)
         {
             stuckArrowsSync stuckArrowsSync = stuckArrowsSync.Create(GlobalTargets.Others);
             stuckArrowsSync.target      = this.entityTarget;
             stuckArrowsSync.removeArrow = true;
             stuckArrowsSync.index       = this.storedIndex;
             stuckArrowsSync.Send();
         }
     }
 }