|
|
|
|
|
|
using NaughtyAttributes; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
public abstract class PickupOwnerBase : MonoBehaviour |
|
|
|
public abstract class PickupOwnerBase : GameplayIngredientsBehaviour |
|
|
|
[ReorderableList, NoLabel] |
|
|
|
public string[] acceptPickupTags; |
|
|
|
|
|
|
|
foreach (var effect in pickup.effects) |
|
|
|
// If PickupItem can be accepted
|
|
|
|
if (acceptPickupTags != null && acceptPickupTags.Contains(pickup.gameObject.tag)) |
|
|
|
effect.ApplyPickupEffect(this); |
|
|
|
// Apply Effects
|
|
|
|
foreach (var effect in pickup.effects) |
|
|
|
{ |
|
|
|
effect.ApplyPickupEffect(this); |
|
|
|
} |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
else |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |