RevFramework – Pickups • Interfaces¶
Folder: Runtime/Systems/Pickups/Interfaces
The Interfaces folder defines the public contracts that other modules or user code can implement.
These interfaces keep the Pickups system extensible, decoupled, and safe to integrate against.
✔ Stable public contracts
✔ Enables custom integrations
✔ No hard coupling between systems
🎯 Purpose¶
Interfaces exist to:
- Provide stable extension points for pickup behaviour
- Decouple effects, decorators, authority, triggers, and feedback
- Allow optional systems (Inventory, Currency, Health, netcode, UI) to integrate without direct references
Everything in this folder is designed to be implemented externally without relying on internal implementation details.
🧩 Key Interfaces¶
IPickupDecoratorCreator¶
Used by PickupEffectFactory to construct decorator instances from definitions.
public interface IPickupDecoratorCreator
{
bool CanHandle(DecoratorType type);
PickupEffect Create(PickupEffect baseEffect, PickupEffectDefinitionBase def);
}
Responsibilities:
- Declare which
DecoratorTypethe creator handles - Instantiate and configure the corresponding
PickupEffectDecorator - Wrap the provided
baseEffectand return the new decorator node
This interface is the only supported way to introduce new decorator types into the factory pipeline.
IPickupTriggerReceiver¶
Receives trigger callbacks forwarded by TriggerRelay2D and TriggerRelay3D.
public interface IPickupTriggerReceiver
{
void OnEnter(GameObject other);
void OnStay(GameObject other);
void OnExit(GameObject other);
}
This abstraction:
- Keeps pickup logic independent of Unity physics APIs
- Supports both 2D and 3D triggers transparently
- Allows custom trigger systems (e.g. CharacterController, ECS, bespoke physics) to integrate cleanly
IPickupFeedback¶
Invoked when a pickup succeeds.
public interface IPickupFeedback
{
void PlayFeedback(Transform at);
}
Typical implementations include:
- Sound effects
- VFX bursts
- UI popups or notifications
- Analytics or telemetry hooks
IPickupFailFeedback¶
Invoked when a pickup attempt fails (e.g. inventory full, unmet requirements, authority denied).
public interface IPickupFailFeedback
{
void PlayFail(Transform at);
}
Typical implementations include:
- Error beeps or buzzers
- Failure flashes or screen effects
- UI error messages or toasts
Failure feedback is advisory only — it does not affect gameplay logic.
🧱 Stability & Versioning¶
All interfaces in this folder are considered long-term stable.
Design guarantees:
- No dependencies on internal implementation classes
- Safe to implement in your own runtime or editor assemblies
- Changes, if any, will be additive rather than breaking
If you implement these interfaces, your integrations should remain compatible across RevFramework updates.
📘 See Also¶
- Decorators — how effects use creators
- Runtime — where trigger receivers are invoked
- Authority — how authority is resolved
- Feedback — success & failure UX hooks