예제 #1
0
    //=====================================================

    private void ChangeState(eWildMagicState state)
    {
        if (_currentState == state)
        {
            return;
        }

        //Debug.Log( state );
        _fxPro.FogStrength        = 0.0f;
        _fxPro.FilmGrainIntensity = 0.0f;

        switch (state)
        {
        case eWildMagicState.BAD:
            _fxPro.BloomEnabled        = false;
            _fxPro.ColorEffectsEnabled = true;

            StartCoroutine(TansistionTo(false, 0.0f, true, 1.0f, true, 0.5f, true, 0.5f));
            break;

        case eWildMagicState.NEUTRAL:
            _fxPro.BloomEnabled        = true;
            _fxPro.ColorEffectsEnabled = true;

            StartCoroutine(TansistionTo(true, 0.99f, true, 0.5f, true, 0.25f, true, 0.25f));
            break;

        case eWildMagicState.GOOD:
            _fxPro.BloomEnabled        = true;
            _fxPro.ColorEffectsEnabled = true;

            StartCoroutine(TansistionTo(true, 0.9f, true, 0.35f, true, 0.0f, true, 0.0f));
            break;
        }

        _previousState = _currentState;
        _currentState  = state;

        _fxPro.Init(false);
    }
예제 #2
0
    //=====================================================

    void Awake()
    {
        _fxPro         = transform.GetComponent <FxPro>();
        _previousState = _currentState = eWildMagicState.NULL;
    }