public void Initialize()
    {
        switch (EventType)
        {
        case XftEventType.CameraShake:
            m_eventHandler = new CameraShakeEvent(this);
            break;

        case XftEventType.Light:
            m_eventHandler = new LightEvent(this);
            break;

        case XftEventType.Sound:
            m_eventHandler = new SoundEvent(this);
            break;

        case XftEventType.CameraRadialBlur:
            m_eventHandler = new RadialBlurEvent(this);
            break;

        case XftEventType.CameraGlow:
            m_eventHandler = new GlowEvent(this);
            break;

        default:
            Debug.LogWarning("wrong event type!");
            break;
        }
        m_eventHandler.Initialize();
    }
예제 #2
0
    public void Initialize()
    {
        switch (Type)
        {
        case XEventType.CameraShake:
            m_eventHandler = new CameraShakeEvent(this);
            break;

        case XEventType.Light:
            m_eventHandler = new LightEvent(this);
            break;

        case XEventType.Sound:
            m_eventHandler = new SoundEvent(this);
            break;

        case XEventType.CameraEffect:
            if (CameraEffectType == CameraEffectEvent.EType.ColorInverse)
            {
                m_eventHandler = new ColorInverseEvent(this);
            }
            else if (CameraEffectType == CameraEffectEvent.EType.Glow)
            {
                m_eventHandler = new GlowEvent(this);
            }
            else if (CameraEffectType == CameraEffectEvent.EType.GlowPerObj)
            {
                m_eventHandler = new GlowPerObjEvent(this);
            }
            else if (CameraEffectType == CameraEffectEvent.EType.RadialBlur)
            {
                m_eventHandler = new RadialBlurEvent(this);
            }
            else if (CameraEffectType == CameraEffectEvent.EType.RadialBlurMask)
            {
                m_eventHandler = new RadialBlurTexAddEvent(this);
            }
            else if (CameraEffectType == CameraEffectEvent.EType.Glitch)
            {
                m_eventHandler = new GlitchEvent(this);
            }
            break;

        case XEventType.TimeScale:
            m_eventHandler = new TimeScaleEvent(this);
            break;

        default:
            Debug.LogWarning("invalid event type!");
            break;
        }
        m_eventHandler.Initialize();
        m_elapsedTime = 0f;
        m_finished    = false;
    }
예제 #3
0
    public void Initialize()
    {
        switch (EventType)
        {
        case XftEventType.CameraShake:
            m_eventHandler = new CameraShakeEvent(this);
            break;

        case XftEventType.Light:
            m_eventHandler = new LightEvent(this);
            break;

        case XftEventType.Sound:
            m_eventHandler = new SoundEvent(this);
            break;

        case XftEventType.CameraRadialBlur:
            m_eventHandler = new RadialBlurEvent(this);
            break;

        case XftEventType.CameraRadialBlurMask:
            m_eventHandler = new RadialBlurTexAddEvent(this);
            break;

        case XftEventType.CameraGlow:
            m_eventHandler = new GlowEvent(this);
            break;

        case XftEventType.CameraColorInverse:
            m_eventHandler = new ColorInverseEvent(this);
            break;

        case XftEventType.TimeScale:
            m_eventHandler = new TimeScaleEvent(this);
            break;

        default:
            Debug.LogWarning("invalid event type!");
            break;
        }
        m_eventHandler.Initialize();
    }