private void Update() { if (Input.GetMouseButtonDown(0)) { userResource.StartRail(translateMousePoint(Input.mousePosition)); } if (Input.GetMouseButton(0)) { userResource.ExtendRail(translateMousePoint(Input.mousePosition)); } if (Input.GetMouseButtonUp(0)) { userResource.EndRail(); } }