PBG2H23ABR_PBG2H23AKL_PMC_P.../Plunderblock/Assets/Scripts/ScriptsKevin/WeaponScript.cs
2024-06-14 19:08:04 +02:00

31 lines
511 B
C#

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();
}
}