Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am working with unity and I am trying to build a better input system for my game.

In essence there would be a singleton class that is the input manager.

The player would subscribe to the manager and pass a handler that handles input.

If the player hits start then the start menu would also subscribe to the manager passing its own handler. When they exit the start menu is closed it is unsubscribed and the player continues to handle the input.

If the player is close to something like a pickup the pickup could subscribe passing it's handler. If they player presses the button to pick it up than it will be handled. If they press something else than this handler doesn't handle it and it moves to the next handler in the chain, the player.

How can I implement this in c#?

share|improve this question
    
You could split this question up into smaller more direct questions. I don't think you'll get many answers, If any, due to the complexity of your question. –  Savlon Jun 2 at 12:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.