.
This commit is contained in:
parent
e94306923e
commit
168960c21d
@ -7,14 +7,13 @@ public class WeaponController : MonoBehaviour
|
||||
[SerializeField] private GameObject bulletPrefab;
|
||||
[SerializeField] private Transform firePos;
|
||||
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
if (Input.GetMouseButtonDown(0))
|
||||
{
|
||||
// 총알 생성 : bulletPrefab을 왼쪽 마우스 버튼 클릭할 때 마다 생성
|
||||
// Instantiate(생성할프리팹, 위치, 각도)
|
||||
Instantiate(bulletPrefab, firePos.position, firePos.rotation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user