Не могу пофиксить ошибку
Assets\Player\Shoot.cs(5,14): error CS0101: The namespace '<global namespace>' already contains a definition for 'Shoot'
Вот такая ошибка сижу и не могу пофиксить, извините пожалуйста за тупость, я вчера только скачал юнити и пітаюсь что-то по видео урокам сделать(
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Shoot : MonoBehaviour
{
public float offset;
public GameObject ammo;
public Transform shotDir;
// Start is called before the first frame update
// Update is called once per frame
void Update()
{
Vector3 difference = Camera.main.ScreenToWorldPoint(Input.mousePosition) - transform.position;
float rotateZ = Mathf.Atan2(difference.y, difference.x) * Mathf.Rad2Deg;
transform.rotation = Quaternion.Euler(0f, 0f, rotateZ + offset);
if (Input.GetMouseButtonDown(1))
{
Instantiate(ammo, shotDir.position, transform.rotation);
}
}
}
Вот код