Player Interaction

The PlayerInteraction class is responsible for managing interactions between the player and various elements in the game world.

Properties

  • private PlayerWorker playerWorker: References the PlayerWorker associated with PlayerInteraction

  • public Element interactable: Represents the current interactable element in the game world.

Constructor

  • public PlayerInteraction(PlayerWorker playerWorker): Initializes a new instance of the PlayerInteraction class, assigning the PlayerWorker.

Methods

  • public void OnUpdate(): Called every frame, checks for interaction inputs and processes them accordingly.

Last updated