Пример #1
0
 public void sendResetAmmoMP()
 {
     if (BoltNetwork.isRunning)
     {
         RockThrowerResetAmmo rockThrowerResetAmmo = RockThrowerResetAmmo.Create(GlobalTargets.Everyone);
         rockThrowerResetAmmo.Target = base.entity;
         rockThrowerResetAmmo.Send();
     }
     else
     {
         this.resetBasketAmmo();
     }
 }
Пример #2
0
 public override void OnEvent(RockThrowerResetAmmo evnt)
 {
     if (evnt.Target)
     {
         rockThrowerItemHolder componentInChildren = evnt.Target.GetComponentInChildren <rockThrowerItemHolder>();
         if (componentInChildren)
         {
             componentInChildren.resetBasketAmmo();
             return;
         }
         MultiThrowerItemHolder componentInChildren2 = evnt.Target.GetComponentInChildren <MultiThrowerItemHolder>();
         if (componentInChildren2)
         {
             componentInChildren2.resetBasketAmmo();
         }
     }
 }
Пример #3
0
 public void sendResetAmmoMP()
 {
     if (BoltNetwork.isRunning)
     {
         RockThrowerResetAmmo rockThrowerResetAmmo = RockThrowerResetAmmo.Create(GlobalTargets.Everyone);
         rockThrowerResetAmmo.Target = base.entity;
         rockThrowerResetAmmo.Send();
     }
     else
     {
         this.ammoLoaded   = 0;
         this.am.ammoCount = 0;
         foreach (GameObject gameObject in this.am.rockAmmo)
         {
             gameObject.SetActive(false);
         }
     }
 }
Пример #4
0
 public void sendResetAmmoMP()
 {
     if (BoltNetwork.isRunning)
     {
         RockThrowerResetAmmo rockThrowerResetAmmo = RockThrowerResetAmmo.Create(GlobalTargets.Everyone);
         rockThrowerResetAmmo.Target = this.entity;
         rockThrowerResetAmmo.Send();
     }
     else
     {
         this.ammoLoaded   = 0;
         this.am.ammoCount = 0;
         GameObject[] rockAmmo = this.am.rockAmmo;
         for (int i = 0; i < rockAmmo.Length; i++)
         {
             GameObject gameObject = rockAmmo[i];
             gameObject.SetActive(false);
         }
     }
 }
Пример #5
0
 public override void OnEvent(RockThrowerResetAmmo evnt)
 {
     if (evnt.Target)
     {
         rockThrowerItemHolder componentInChildren = evnt.Target.GetComponentInChildren<rockThrowerItemHolder>();
         if (componentInChildren)
         {
             componentInChildren.resetBasketAmmo();
             return;
         }
         MultiThrowerItemHolder componentInChildren2 = evnt.Target.GetComponentInChildren<MultiThrowerItemHolder>();
         if (componentInChildren2)
         {
             componentInChildren2.resetBasketAmmo();
         }
     }
 }