diff options
author | cross28 <icross028@gmail.com> | 2022-04-14 20:17:12 -0500 |
---|---|---|
committer | cross28 <icross028@gmail.com> | 2022-04-14 20:17:12 -0500 |
commit | 626057f677ee9e707fd21399a4e07e1cfd6016ae (patch) | |
tree | e7a5ef0f25bd9b1dd60bb90231f0ec1ec9960dfc /Assets/Scripts/Weapon.cs | |
parent | 15a62795a2f2d9e7311bea4b59430c589125ec79 (diff) |
Moved projectile firing logic to Player class
Diffstat (limited to 'Assets/Scripts/Weapon.cs')
-rw-r--r-- | Assets/Scripts/Weapon.cs | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/Assets/Scripts/Weapon.cs b/Assets/Scripts/Weapon.cs deleted file mode 100644 index 1af1abb..0000000 --- a/Assets/Scripts/Weapon.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class Weapon : MonoBehaviour -{ - public Transform firePoint; - public GameObject projectilePrefab; - - // Update is called once per frame - void Update() - { - if (Input.GetButtonDown("Fire1")) - { - Shoot(); - } - } - - void Shoot() - { - Instantiate(projectilePrefab, firePoint.position, firePoint.rotation); - } -} |