Fishingnet
Overview
The fishingnet component allows its associated entity to initiate a fishing net cast at a given world position. It does not manage the full fishing logic itself but delegates visual and behavioral coordination to a spawned fishingnetvisualizer prefab.
Dependencies & Tags
- Requires:
fishingnetvisualizercomponent in the spawnedfishingnetvisualizerprefab (used viacomponents.fishingnetvisualizer). - No components are added to
self.inst. - No tags are added or removed.
Properties
| Property | Type | Default Value | Description |
|---|---|---|---|
inst | GameObject | (passed into constructor) | Reference to the entity instance the component is attached to. |
visualizer | GameObject? | nil | Stores the spawned fishingnetvisualizer instance after CastNet is called; nil before first use. |
Main Functions
CastNet(pos_x, pos_z, doer)
- Description: Spawns a
fishingnetvisualizerprefab and instructs itsfishingnetvisualizercomponent to begin a cast animation/sequence at the specified world coordinates. Stores the visualizer reference and returnstrue. - Parameters:
pos_x(number): X-coordinate of the cast location.pos_z(number): Z-coordinate of the cast location.doer(GameObject): The entity performing the cast (e.g., the player or character).
Events & Listeners
None.