diff --git a/Scripts/Weapon.cs b/Scripts/Weapon.cs index ae60495..faef60b 100644 --- a/Scripts/Weapon.cs +++ b/Scripts/Weapon.cs @@ -1,4 +1,3 @@ -using System; using UnityEngine; namespace GameDev.CoreSystems @@ -17,40 +16,14 @@ namespace GameDev.CoreSystems [field: SerializeField] public bool FireWeapon { get; set; } [field: SerializeField] private float _timeUntilFire; - private Vector3 _start; - private Vector3 _direction; - // private bool drawGizmo; - // private Vector3 start; - // private Vector3 end; - // - // private void OnEnable() - // { - // start = BarrelEndPoint.position; - // end = BarrelEndPoint.position; - // } - // - // private void OnDrawGizmos() - // { - // if (drawGizmo) - // { - // Gizmos.DrawLine(start, end); - // } - // } - private void Update() { if (FireWeapon) { - // drawGizmo = true; - // start = BarrelEndPoint.position; - // end = start + Vector3.forward * 5; _timeUntilFire -= Time.deltaTime; if (!(_timeUntilFire <= 0)) return; - // _start = BarrelEndPoint.position; - //_direction = BarrelEndPoint.forward; - var ray = new Ray(BarrelEndPoint.position, BarrelEndPoint.forward); Debug.DrawRay(BarrelEndPoint.position, BarrelEndPoint.forward * 10, Color.green); @@ -58,7 +31,6 @@ namespace GameDev.CoreSystems { if (hitInfo.transform.TryGetComponent(out Targetable target)) { - print("pew"); target.Damageable.ModifyHealth(Mathf.RoundToInt(-Damage)); } } @@ -67,7 +39,6 @@ namespace GameDev.CoreSystems } else { - // drawGizmo = false; _timeUntilFire = 0; } }