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

public class WeaponScript : MonoBehaviour
{

    public GameObject spawnpoint;
    public GameObject bullet;
    
    private void shoot(){
        if(Input.GetKeyDown(KeyCode.Mouse0)){
            Instantiate(bullet,spawnpoint.transform.position,transform.rotation);
        }

        
    }
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
        shoot();
    }
}