예제 #1
0
 private void Update()
 {
     // Selecting
     if (Input.GetMouseButtonUp(0))
     {
         stateHandler.InputLeftClick(GetTilePosUnderMouse(Camera.main.ScreenToWorldPoint(Input.mousePosition)));
     }
     // Moving
     else if (Input.GetMouseButtonUp(1))
     {
         stateHandler.InputRightClick(GetTilePosUnderMouse(Camera.main.ScreenToWorldPoint(Input.mousePosition)));
     }
 }