Skip to main content

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: fishingnetvisualizer component in the spawned fishingnetvisualizer prefab (used via components.fishingnetvisualizer).
  • No components are added to self.inst.
  • No tags are added or removed.

Properties

PropertyTypeDefault ValueDescription
instGameObject(passed into constructor)Reference to the entity instance the component is attached to.
visualizerGameObject?nilStores the spawned fishingnetvisualizer instance after CastNet is called; nil before first use.

Main Functions

CastNet(pos_x, pos_z, doer)

  • Description: Spawns a fishingnetvisualizer prefab and instructs its fishingnetvisualizer component to begin a cast animation/sequence at the specified world coordinates. Stores the visualizer reference and returns true.
  • 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.