Exemplo n.º 1
0
    //----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    // 透明度
    public static void ALPHA_WINDOW(txUIObject obj, float alpha)
    {
        CommandWindowAlphaTremble cmd = mCommandSystem.newCmd <CommandWindowAlphaTremble>(false);

        cmd.mName        = "";
        cmd.mOnceLength  = 0.0f;
        cmd.mStartAlpha  = alpha;
        cmd.mTargetAlpha = alpha;
        mCommandSystem.pushCommand(cmd, obj);
    }
Exemplo n.º 2
0
    public static CommandWindowAlphaTremble ALPHA_WINDOW_DELAY(LayoutScript script, txUIObject obj, float delayTime, float alpha)
    {
        CommandWindowAlphaTremble cmd = mCommandSystem.newCmd <CommandWindowAlphaTremble>(false, true);

        cmd.mName        = "";
        cmd.mOnceLength  = 0.0f;
        cmd.mStartAlpha  = alpha;
        cmd.mTargetAlpha = alpha;
        mCommandSystem.pushDelayCommand(cmd, obj, delayTime);
        script.addDelayCmd(cmd);
        return(cmd);
    }
Exemplo n.º 3
0
    //-----------------------------------------------------------------------------------------------------------------------------------------------------------
    // 透明
    // 用关键帧窗口透明度震动
    public static void ALPHA_TREMBLE_WINDOW(txUIObject obj, string name, float start, float target, bool loop, float onceLength, float offset)
    {
        CommandWindowAlphaTremble cmd = mCommandSystem.newCmd <CommandWindowAlphaTremble>(false);

        cmd.mName        = name;
        cmd.mLoop        = loop;
        cmd.mOnceLength  = onceLength;
        cmd.mOffset      = offset;
        cmd.mStartAlpha  = start;
        cmd.mTargetAlpha = target;
        mCommandSystem.pushCommand(cmd, obj);
    }
Exemplo n.º 4
0
    // 延迟用关键帧窗口透明度震动
    public static void ALPHA_TREMBLE_WINDOW_DELAY(LayoutScript script, txUIObject obj, float delayTime, string name, float start, float target, bool loop, float onceLength, float offset)
    {
        CommandWindowAlphaTremble cmd = mCommandSystem.newCmd <CommandWindowAlphaTremble>(false, true);

        cmd.mName        = name;
        cmd.mLoop        = loop;
        cmd.mOnceLength  = onceLength;
        cmd.mOffset      = offset;
        cmd.mStartAlpha  = start;
        cmd.mTargetAlpha = target;
        mCommandSystem.pushDelayCommand(cmd, obj, delayTime);
        script.addDelayCmd(cmd);
    }
Exemplo n.º 5
0
    // 用关键帧窗口透明度震动,可以设置回调函数
    public static void ALPHA_TREMBLE_WINDOW_EX(txUIObject obj, string name, float start, float target, bool loop, float onceLength, float offset, bool randomOffset, KeyFrameCallback tremblingCallback, object tremblingUserData, KeyFrameCallback trembleDoneCallback, object trembleDoneUserData)
    {
        CommandWindowAlphaTremble cmd = mCommandSystem.newCmd <CommandWindowAlphaTremble>(false);

        cmd.mName         = name;
        cmd.mLoop         = loop;
        cmd.mOnceLength   = onceLength;
        cmd.mOffset       = offset;
        cmd.mStartAlpha   = start;
        cmd.mTargetAlpha  = target;
        cmd.mRandomOffset = randomOffset;
        cmd.setTremblingCallback(tremblingCallback, tremblingUserData);
        cmd.setTrembleDoneCallback(trembleDoneCallback, trembleDoneUserData);
        mCommandSystem.pushCommand(cmd, obj);
    }
Exemplo n.º 6
0
    public static void ALPHA_KEYFRAME_WINDOW_EX(txUIObject obj, string name, float start, float target, float onceLength, bool loop, float offset, KeyFrameCallback tremblingCallback, KeyFrameCallback trembleDoneCallback)
    {
        if (name == "" || MathUtility.isFloatZero(onceLength))
        {
            UnityUtility.logError("时间或关键帧不能为空,如果要停止组件,请使用void ALPHA_WINDOW(txUIObject obj, float alpha)");
        }
        CommandWindowAlphaTremble cmd = mCommandSystem.newCmd <CommandWindowAlphaTremble>(false);

        cmd.mName        = name;
        cmd.mLoop        = loop;
        cmd.mOnceLength  = onceLength;
        cmd.mOffset      = offset;
        cmd.mStartAlpha  = start;
        cmd.mTargetAlpha = target;
        cmd.setTremblingCallback(tremblingCallback, null);
        cmd.setTrembleDoneCallback(trembleDoneCallback, null);
        mCommandSystem.pushCommand(cmd, obj);
    }
Exemplo n.º 7
0
    public static CommandWindowAlphaTremble ALPHA_KEYFRAME_WINDOW_DELAY_EX(LayoutScript script, txUIObject obj, float delayTime, string keyframe, float start, float target, float onceLength, bool loop, float offset, KeyFrameCallback tremblingCallback, KeyFrameCallback trembleDoneCallback)
    {
        if (keyframe == "" || MathUtility.isFloatZero(onceLength))
        {
            UnityUtility.logError("时间或关键帧不能为空,如果要停止组件,请使用CommandWindowAlphaTremble ALPHA_WINDOW_DELAY(LayoutScript script, txUIObject obj, float delayTime, float alpha)");
        }
        CommandWindowAlphaTremble cmd = mCommandSystem.newCmd <CommandWindowAlphaTremble>(false, true);

        cmd.mName        = keyframe;
        cmd.mLoop        = loop;
        cmd.mOnceLength  = onceLength;
        cmd.mOffset      = offset;
        cmd.mStartAlpha  = start;
        cmd.mTargetAlpha = target;
        cmd.setTremblingCallback(tremblingCallback, null);
        cmd.setTrembleDoneCallback(trembleDoneCallback, null);
        mCommandSystem.pushDelayCommand(cmd, obj, delayTime);
        script.addDelayCmd(cmd);
        return(cmd);
    }