2025-07-16 15:40:00 +07:00

91 lines
3.1 KiB
Markdown

---
sidebar_position: 1
---
# Pickup Controller
---
## Index
### Methods
- [_registerEvent](#_registerevent) — Registers events related to pickups.
- [onViewPickupItem](#onviewpickupitem) — Handles item selection initiated from the view.
- [onViewPresentPickupResultCompleted](#onviewpresentpickupresultcompleted) — Handles result display completion from the view.
- [onPickupItemReceived](#onpickupitemreceived) — Handles the event when an item result is received.
- [onPickupReady](#onpickupready) — Called when the pickup feature becomes available.
- [pickup](#pickup) — Sends a request to pick up an item.
- [pickupEnd](#pickupend) — Handles the end of the pickup feature and notifies listeners.
---
## Details
### Methods
#### _registerEvent
Registers events related to pickups.
| Meta | Description |
|------|-------------|
| Defined in | [p4f-slotty-core/src/controller/pickup-controller.js#L17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/pickup-controller.js#L17) |
---
#### onViewPickupItem
Handles item selection initiated from the view.
| Meta | Description |
|------|-------------|
| Defined in | [p4f-slotty-core/src/controller/pickup-controller.js#L23](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/pickup-controller.js#L23) |
---
#### onViewPresentPickupResultCompleted
Handles result display completion from the view.
| Meta | Description |
|------|-------------|
| Defined in | [p4f-slotty-core/src/controller/pickup-controller.js#L30](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/pickup-controller.js#L30) |
---
#### onPickupItemReceived
Handles the event when an item result is received..
| Meta | Description |
|------|-------------|
| Defined in | [p4f-slotty-core/src/controller/pickup-controller.js#L37](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/pickup-controller.js#L37) |
---
#### onPickupReady
Called when the pickup feature becomes available.
| Meta | Description |
|------|-------------|
| Defined in | [p4f-slotty-core/src/controller/pickup-controller.js#L45](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/pickup-controller.js#L45) |
---
#### pickup
Sends a request to pick up an item
| Meta | Description |
|------|-------------|
| Defined in | [p4f-slotty-core/src/controller/pickup-controller.js#L55](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/pickup-controller.js#L55) |
---
#### pickupEnd
Handles the end of the pickup feature and notifies listeners.
| Meta | Description |
|------|-------------|
| Defined in | [p4f-slotty-core/src/controller/pickup-controller.js#L63](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/pickup-controller.js#L63) |