Example #1
0
 void HumanBackpack_OnReceivedAmmo(HumanBackpack e)
 {
     if (e == backpack)
     {
         ManualReload();
     }
 }
Example #2
0
 void Awake()
 {
     gun      = GetComponentInChildren <RangedWeapon>();
     backpack = GetComponentInChildren <HumanBackpack>();
     RangedWeapon.OnWeaponClipDepleted += Gun_OnGunClipDepleted;
     PlayerShooting.OnPickedUpGun      += PlayerShooting_OnPickedUpGun;
     //PlayerPhysicalMovement.OnCollidedWithSomething += PlayerPhysicalMovement_OnCollidedWithSomething;
     HumanBackpack.OnReceivedAmmo += HumanBackpack_OnReceivedAmmo;
 }
Example #3
0
 // Use this for initialization
 void Awake()
 {
     HumanGunReloader.OnStartedToReload += HumanGunReloader_OnStartedToReload;
     HumanGunReloader.OnReloaded        += HumanGunReloader_OnReloaded;
     PlayerShooting.OnPickedUpGun       += PlayerShooting_OnPickedUpGun;
     playerHealth    = Player.GetComponentInChildren <HumanHealth>();
     playersGun      = Player.GetComponentInChildren <RangedWeapon>();
     playersReloader = Player.GetComponentInChildren <HumanGunReloader>();
     backpack        = Player.GetComponentInChildren <HumanBackpack>();
 }