Example #1
0
        private void Update()
        {
            if (movementComponent.HasTarget)
            {
                return;
            }

            shooterComponent.EndShoot();
            if (shootCoroutine != null)
            {
                StopCoroutine(shootCoroutine);
            }
        }
        private void ProcessShootInput()
        {
            if (Input.GetButtonDown(shootName))
            {
                shooterComponent.BeginShoot();
            }

            if (Input.GetButtonUp(shootName))
            {
                shooterComponent.EndShoot();
            }
        }