- Home /
Question by
engineeroftheyear · May 23, 2015 at 02:39 PM ·
camera2dtouch
To route or not to route?
Hi, I'm new to Unity5,
I wanna know the best practice for Touch Inputs.
Is it better to:
Create InputController class and route the input to the appropriate script?
Have every script listen on the inputs?
From my personal understanding, choice #1 will have a single Update() function, while choice #2 will require an Update() function for every script.
As an example, for a 2D game like angry birds, I need to know whether to drag the camera or drag the projectile. Do I want a single controller to pass inputs to the camera or projectile (choice #1) OR have each projectile tell the CameraScript not to drag it when its been touched (choice #2)
Comment