Ejemplo n.º 1
0
 private void AssignInputListeners()
 {
     _inputManager.AddListenerOnPointerDownEvent(HandleInput);
     _inputManager.AddListenerOnPointerSecondChangeEvent(HandleInputCameraPan);
     _inputManager.AddListenerOnPointerSecondUpEvent(HandleInputCameraPanStop);
     _inputManager.AddListenerOnPointerChangeEvent(HandlePointerChange);
 }
Ejemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     CameraMovement.InitCameraBound(0, Width, 0, Length);
     _grid        = new GridStructure(_cellSize, Width, Length);
     InputManager = FindObjectsOfType <MonoBehaviour>().OfType <IInputManager>().FirstOrDefault();
     InputManager.AddListenerOnPointerDownEvent(HandlePoint);
     InputManager.AddOnPointerSecondDownEvent(HandleInputCameraPan);
     InputManager.AddOnPointerSecondUpEvent(HandleInputCameraPanStop);
     UIController.AddOnBuildAreaEvent(StartPlacementMode);
     UIController.AddOnCancelActionEvent(CancelAction);
 }