Exemplo n.º 1
0
    private void OnTriggerExit(Collider other)
    {
        PlayerDamageEntity possibleTarget = other.GetComponentInParent <PlayerDamageEntity>();

        if (possibleTarget != null)
        {
            target       = null;
            currentState = EAAGunState.Idle;
            aim.targetRB = null;
        }
    }
Exemplo n.º 2
0
    public void SetFiringState()
    {
        if (target != null)
        {
            if (target.GetComponentInChildren <PlayerFlightControls>().currentAltSetting == EAlts.Low)
            {
                currentState = EAAGunState.ShootingLowAlt;
            }

            else if (target.GetComponentInChildren <PlayerFlightControls>().currentAltSetting == EAlts.Mid)
            {
                currentState = EAAGunState.ShootingMedAlt;
            }
            else
            {
                currentState = EAAGunState.Idle;
            }
        }
        else
        {
            currentState = EAAGunState.Idle;
        }
    }