コード例 #1
0
    public override void execute()
    {
        txUIObject           obj       = mReceiver as txUIObject;
        WindowComponentAudio component = obj.getComponent(out component);

        component.setActive(true);
        string soundName = mSound != SOUND_DEFINE.SD_MAX ? mAudioManager.getAudioName(mSound) : mSoundFileName;

        if (mUseVolumeCoe)
        {
            mVolume *= mAudioManager.getVolumeScale(mSound);
        }
        component.play(soundName, mLoop, mVolume);
    }
コード例 #2
0
    public override void execute()
    {
        txUIObject            obj       = mReceiver as txUIObject;
        WindowComponentSlider component = obj.getComponent(out component);

        component.setTremblingCallback(mTremblingCallBack);
        component.setTrembleDoneCallback(mTrembleDoneCallBack);
        component.setActive(true);
        component.setStartValue(mStartValue);
        component.setTargetValue(mTargetValue);
        component.play(mTremblingName, mLoop, mOnceLength, mOffset, mFullOnce, mAmplitude);
        if (component.getState() == PLAY_STATE.PS_PLAY)
        {
            // 需要启用组件更新时,则开启组件拥有者的更新,后续也不会再关闭
            obj.setEnable(true);
        }
    }
コード例 #3
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);
        }
    }
コード例 #4
0
    public override void execute()
    {
        txUIObject obj = mReceiver as txUIObject;
        WindowComponentAlphaPath component = obj.getComponent(out component);

        // 停止其他相关组件
        obj.breakComponent <IComponentModifyAlpha>(component.GetType());
        component.setTremblingCallback(mDoingCallBack);
        component.setTrembleDoneCallback(mDoneCallBack);
        component.setActive(true);
        component.setValueKeyFrame(mValueKeyFrame);
        component.setSpeed(mSpeed);
        component.setValueOffset(mValueOffset);
        component.play(mLoop, mOffset, mFullOnce);
        if (component.getState() == PLAY_STATE.PS_PLAY)
        {
            // 需要启用组件更新时,则开启组件拥有者的更新,后续也不会再关闭
            obj.setEnable(true);
        }
    }
コード例 #5
0
 public static void releaseMutexDragView(txUIObject dragView0, txUIObject dragView1)
 {
     releaseMutexDragView(dragView0.getComponent <WindowComponentDragView>(), dragView1.getComponent <WindowComponentDragView>());
 }