PBG2H23ABR_PBG2H23AKL_PMC_P.../Plunderblock/Assets/Scripts/ScriptsKevin/WeaponScript.cs
2024-06-14 16:58:09 +02:00

31 lines
502 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class WeaponScript : MonoBehaviour
{
public GameObject parent;
public GameObject bullet;
public void shoot(){
if(Input.GetKeyDown(KeyCode.Mouse0)){
Instantiate(bullet,transform.position,parent.transform.rotation);
}
}
void Start()
{
}
// Update is called once per frame
void Update()
{
shoot();
}
}