Esempio n. 1
0
        public override void GrantPickup(PickupBehavior pickupBehavior)
        {
            Player player = pickupBehavior.gameObject.GetComponent <Player>();

            if (player != null)
            {
                player.Heal(healAmount);
            }
            NetworkServer.Destroy(gameObject);
            Destroy(gameObject);
        }
Esempio n. 2
0
        public override void GrantPickup(PickupBehavior pickupBehavior)
        {
            Weapon weapon = pickupBehavior.gameObject.GetComponent <Weapon>();

            if (weapon == null)
            {
                return;
            }

            weapon.RefillAmmo();
            NetworkServer.Destroy(gameObject);
            Destroy(gameObject);
        }
Esempio n. 3
0
 public abstract void GrantPickup(PickupBehavior pickupBehavior);