public override DebrisObject Drop(PlayerController player)
        {
            cooldownBehavior cooldownBehavior = player.gameObject.GetComponent <cooldownBehavior>();

            UnityEngine.Object.Destroy(cooldownBehavior);
            return(base.Drop(player));
        }
        public override void Pickup(PlayerController player)
        {
            base.Pickup(player);
            cooldownBehavior cooldownBehavior = player.gameObject.GetOrAddComponent <cooldownBehavior>();

            cooldownBehavior.parentItem = this;
        }
예제 #3
0
        public override DebrisObject Drop(PlayerController player)
        {
            PassiveItem.DecrementFlag(player, typeof(CatchingMitts));
            cooldownBehavior cooldownBehavior = player.gameObject.GetComponent <cooldownBehavior>();

            UnityEngine.Object.Destroy(cooldownBehavior);
            return(base.Drop(player));
        }
예제 #4
0
 protected override void OnDestroy()
 {
     base.OnDestroy();
     if (base.Owner != null)
     {
         PlayerController player = base.Owner;
         PassiveItem.DecrementFlag(player, typeof(CatchingMitts));
         cooldownBehavior cooldownBehavior = player.gameObject.GetComponent <cooldownBehavior>();
         UnityEngine.Object.Destroy(cooldownBehavior);
     }
 }
예제 #5
0
        public override void Pickup(PlayerController player)
        {
            base.Pickup(player);
            PassiveItem.IncrementFlag(player, typeof(CatchingMitts));
            if (!PassiveItem.ActiveFlagItems.ContainsKey(player))
            {
                PassiveItem.ActiveFlagItems.Add(player, new Dictionary <Type, int>());
            }
            cooldownBehavior cooldownBehavior = player.gameObject.GetOrAddComponent <cooldownBehavior>();

            cooldownBehavior.parentItem = this;
        }