コード例 #1
0
    // 窗口匀速旋转至指定窗口
    public static void ROTATE_TARGET_WINDOW(txUIObject obj, Vector3 start, Vector3 target, float time)
    {
        CommandWindowRotateToTarget cmdRotate = mCommandSystem.newCmd <CommandWindowRotateToTarget>(false);

        cmdRotate.mStartAngle  = start;
        cmdRotate.mTargetAngle = target;
        cmdRotate.mRotateTime  = time;
        mCommandSystem.pushCommand(cmdRotate, obj);
    }
コード例 #2
0
    // 窗口延迟匀速旋转至指定窗口
    public static void ROTATE_TARGET_WINDOW_DELAY(LayoutScript script, txUIObject obj, float delayTime, Vector3 start, Vector3 target, float time)
    {
        CommandWindowRotateToTarget cmd = mCommandSystem.newCmd <CommandWindowRotateToTarget>(false, true);

        cmd.mStartAngle  = start;
        cmd.mTargetAngle = target;
        cmd.mRotateTime  = time;
        mCommandSystem.pushDelayCommand(cmd, obj, delayTime);
        script.addDelayCmd(cmd);
    }
コード例 #3
0
    // 窗口匀速旋转至指定角度,并且可以设置回调函数
    public static void ROTATE_TARGET_WINDOW_EX(txUIObject obj, Vector3 start, Vector3 target, float time, RotateToTargetCallback rotatingCallback, object rotatingUserData, RotateToTargetCallback doneCallback, object doneUserData)
    {
        CommandWindowRotateToTarget cmdRotate = mCommandSystem.newCmd <CommandWindowRotateToTarget>(false);

        cmdRotate.mStartAngle  = start;
        cmdRotate.mTargetAngle = target;
        cmdRotate.mRotateTime  = time;
        cmdRotate.setRotatingCallback(rotatingCallback, rotatingUserData);
        cmdRotate.setRotateDoneCallback(doneCallback, doneUserData);
        mCommandSystem.pushCommand(cmdRotate, obj);
    }