rushassets / ultimate-grid-inventory-demos

Repository containg the Ultimate Grid Inventory demos and their issues
https://www.rushassets.com/products/ultimate-grid-inventory
MIT License
2 stars 0 forks source link

Improve InventoryInputHandler for a InputProvider #30

Closed RubensKj closed 1 year ago

RubensKj commented 1 year ago

Description

The idea is to create an Input Provider instead of handling events inside the InventoryInputHandler.

Creating an provider will encapsulate the input logic inside a class and we can have middlewares for changing this input.

Implementation ideas

Create an InputProvider that holds the actions for when the mouse stop holding, on click.... also the mouse position and other.

The idea is to remove the dependency from the class OnInputTriggerEventChannelSo, or maybe remove it completely. Instead of dependeding from an event, you depend on the InputProvider.

This could help us to develop a better input: https://www.youtube.com/watch?v=pOEyYwKtHJo&ab_channel=aarthificial