public static void ROTATE_WINDOW(txUIObject obj, Vector3 rotation) { CommandWindowKeyFrameRotate cmd = mCommandSystem.newCmd <CommandWindowKeyFrameRotate>(false, false); cmd.mName = ""; cmd.mOnceLength = 0.0f; cmd.mStartRotation = rotation; cmd.mTargetRotation = rotation; mCommandSystem.pushCommand(cmd, obj); }
public static CommandWindowKeyFrameRotate ROTATE_WINDOW_DELAY(LayoutScript script, txUIObject obj, float delayTime, Vector3 rotation) { CommandWindowKeyFrameRotate cmd = mCommandSystem.newCmd <CommandWindowKeyFrameRotate>(false, true); cmd.mName = ""; cmd.mOnceLength = 0.0f; cmd.mStartRotation = rotation; cmd.mTargetRotation = rotation; mCommandSystem.pushDelayCommand(cmd, obj, delayTime); script.addDelayCmd(cmd); return(cmd); }
// 根据关键帧旋转窗口 public static void ROTATE_KEY_FRMAE_WINDOW(txUIObject obj, string fileName, Vector3 start, Vector3 target, float onceLength, float offset, bool loop, bool fullonce, bool randomOffset) { CommandWindowKeyFrameRotate cmd = mCommandSystem.newCmd <CommandWindowKeyFrameRotate>(false, false); cmd.mName = fileName; cmd.mOnceLength = onceLength; cmd.mStartRotation = start; cmd.mTargetRotation = target; cmd.mOffset = offset; cmd.mLoop = loop; cmd.mFullOnce = fullonce; cmd.mRandomOffset = randomOffset; mCommandSystem.pushCommand(cmd, obj); }
// 根据关键帧延迟旋转窗口 public static void ROTATE_KEY_FRMAE_WINDOW_DELAY(LayoutScript script, txUIObject obj, float delayTime, string fileName, Vector3 start, Vector3 target, float onceLength, float offset, bool loop, bool fullonce, bool randomOffset) { CommandWindowKeyFrameRotate cmd = mCommandSystem.newCmd <CommandWindowKeyFrameRotate>(false, true); cmd.mName = fileName; cmd.mOnceLength = onceLength; cmd.mStartRotation = start; cmd.mTargetRotation = target; cmd.mOffset = offset; cmd.mLoop = loop; cmd.mFullOnce = fullonce; cmd.mRandomOffset = randomOffset; mCommandSystem.pushDelayCommand(cmd, obj, delayTime); script.addDelayCmd(cmd); }
public static CommandWindowKeyFrameRotate ROTATE_KEYFRMAE_WINDOW_DELAY(LayoutScript script, txUIObject obj, float delayTime, string keyframe, Vector3 start, Vector3 target, float onceLength, bool loop, float offset) { if (keyframe == "" || MathUtility.isFloatZero(onceLength)) { UnityUtility.logError("时间或关键帧不能为空,如果要停止组件,请使用CommandWindowKeyFrameRotate ROTATE_WINDOW_DELAY(LayoutScript script, txUIObject obj, float delayTime, Vector3 rotation)"); } CommandWindowKeyFrameRotate cmd = mCommandSystem.newCmd <CommandWindowKeyFrameRotate>(false, true); cmd.mName = keyframe; cmd.mOnceLength = onceLength; cmd.mStartRotation = start; cmd.mTargetRotation = target; cmd.mOffset = offset; cmd.mLoop = loop; mCommandSystem.pushDelayCommand(cmd, obj, delayTime); script.addDelayCmd(cmd); return(cmd); }
public static void ROTATE_KEYFRMAE_WINDOW_EX(txUIObject obj, string keyframe, Vector3 start, Vector3 target, float onceLength, bool loop, float offset, KeyFrameCallback rotatingCallback, KeyFrameCallback doneCallback) { if (keyframe == "" || MathUtility.isFloatZero(onceLength)) { UnityUtility.logError("时间或关键帧不能为空,如果要停止组件,请使用void ROTATE_WINDOW(txUIObject obj, Vector3 rotation)"); } CommandWindowKeyFrameRotate cmd = mCommandSystem.newCmd <CommandWindowKeyFrameRotate>(false, false); cmd.mName = keyframe; cmd.mOnceLength = onceLength; cmd.mStartRotation = start; cmd.mTargetRotation = target; cmd.mOffset = offset; cmd.mLoop = loop; cmd.setTremblingCallback(rotatingCallback, null); cmd.setTrembleDoneCallback(doneCallback, null); mCommandSystem.pushCommand(cmd, obj); }