using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class FPS_mover : MonoBehaviour {

    // public float mainSPEED;
    public float x_sensi;
    public float y_sensi;
    public new GameObject camera;
    void Start()
    {
    }

    void Update()
    {
        // movecon();
        if (Input.GetMouseButton(0))
        {
            cameracon();
        }

    }

    void cameracon()
    {
        float x_Rotation = Input.GetAxis("Mouse X");
        float y_Rotation = Input.GetAxis("Mouse Y");
        x_Rotation = x_Rotation * x_sensi;
        y_Rotation = y_Rotation * y_sensi;
        camera.transform.Rotate(0, x_Rotation, 0);
        camera.transform.Rotate(-y_Rotation, 0, 0);
    }
}
