public class Menu : MonoBehaviour{
public GameObject LeftMenu;
void Update () {
float camHalfHeight = Camera.main.orthographicSize;
float camHalfWidth = Camera.main.aspect * camHalfHeight;
Bounds bounds = GetComponent<SpriteRenderer>().bounds;
Vector3 topLeftPosition = new Vector3(-camHalfWidth, camHalfHeight, 0) + Camera.main.transform.position;
topLeftPosition += new Vector3(bounds.size.x / 2, -bounds.size.y / 2, 0);
transform.position = topLeftPosition;
}
}
Cannot implicitly convert type 'float' to 'bool'
if (mousePos.x>3f) mousePos.x=3f;