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; }
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)); }
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); } }
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; }