Exemple #1
0
    public override void execute()
    {
        txUIObject           window         = mReceiver as txUIObject;
        WindowComponentAlpha componentAlpha = window.getFirstComponent <WindowComponentAlpha>();

        if (componentAlpha != null)
        {
            componentAlpha.setActive(true);
            componentAlpha.setFadingCallback(mFadingCallback, mFadingData);
            componentAlpha.setFadeDoneCallback(mFadeDoneCallBack, mFadeDoneData);
            componentAlpha.start(mStartAlpha, mTargetAlpha, mFadeTime, mTimeOffset);
        }
    }
    public override void execute()
    {
        ComponentOwner       obj       = mReceiver as ComponentOwner;
        WindowComponentAlpha component = obj.getComponent(out component);

        // 停止其他相关组件
        obj.breakComponent <IComponentModifyAlpha>(component.GetType());
        component.setTremblingCallback(mTremblingCallBack);
        component.setTrembleDoneCallback(mTrembleDoneCallBack);
        component.setActive(true);
        component.setStartAlpha(mStartAlpha);
        component.setTargetAlpha(mTargetAlpha);
        component.play(mName, mLoop, mOnceLength, mOffset, mFullOnce, mAmplitude);
    }
Exemple #3
0
    public override void execute()
    {
        txUIObject           window       = mReceiver as txUIObject;
        WindowComponentAlpha comTrembling = window.getFirstComponent <WindowComponentAlpha>();

        if (comTrembling != null)
        {
            comTrembling.setTremblingCallback(mTremblingCallBack, mTremblingUserData);
            comTrembling.setTrembleDoneCallback(mTrembleDoneCallBack, mTrembleDoneUserData);
            comTrembling.setActive(true);
            comTrembling.setStartAlpha(mStartAlpha);
            comTrembling.setTargetAlpha(mTargetAlpha);
            comTrembling.play(mName, mLoop, mOnceLength, mOffset, mFullOnce, mAmplitude);
        }
    }
Exemple #4
0
    public override void execute()
    {
        txUIObject           obj       = mReceiver as txUIObject;
        WindowComponentAlpha component = obj.getComponent(out component);

        // 停止其他相关组件
        obj.breakComponent <IComponentModifyAlpha>(component.GetType());
        component.setTremblingCallback(mTremblingCallBack);
        component.setTrembleDoneCallback(mTrembleDoneCallBack);
        component.setActive(true);
        component.setStartAlpha(mStartAlpha);
        component.setTargetAlpha(mTargetAlpha);
        component.play(mName, mLoop, mOnceLength, mOffset, mFullOnce, mAmplitude);
        if (component.getState() == PLAY_STATE.PS_PLAY)
        {
            // 需要启用组件更新时,则开启组件拥有者的更新,后续也不会再关闭
            obj.setEnable(true);
        }
    }