Example #1
0
 private void AssignInputListeners()
 {
     _inputManager.AddListenerOnPointerDownEvent(HandleInput);
     _inputManager.AddListenerOnPointerSecondChangeEvent(HandleInputCameraPan);
     _inputManager.AddListenerOnPointerSecondUpEvent(HandleInputCameraPanStop);
     _inputManager.AddListenerOnPointerChangeEvent(HandlePointerChange);
 }
 // 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);
 }