private void ProcessShootInput()
        {
            if (Input.GetButtonDown(shootName))
            {
                shooterComponent.BeginShoot();
            }

            if (Input.GetButtonUp(shootName))
            {
                shooterComponent.EndShoot();
            }
        }
Example #2
0
        private void OnEnable()
        {
            SetRndSpriteVariation();
            healthComponent.OnDeath += OnDeath;

            EnemyShipData shipData = (EnemyShipData)shipComponent.Data;

            switch (shipData.ShootPattern)
            {
            case EShootPattern.Continuous:
                shooterComponent.BeginShoot();
                break;

            case EShootPattern.Burst:
                shootCoroutine = StartCoroutine(ShootBurst());
                break;

            case EShootPattern.Single:
                shootCoroutine = StartCoroutine(ShootSingle());
                break;
            }
        }