fix Doc Tag error (#4589)

This commit is contained in:
ChiaNing
2019-06-11 16:55:44 +08:00
committed by Weiliang Wang
parent 25660046fb
commit 74fc5b23c3
3 changed files with 19 additions and 13 deletions
+9 -7
View File
@@ -238,8 +238,9 @@ export class AnimationComponent extends Component implements IEventTarget {
}
/**
* 获取指定的动画状态。
* @deprecated 请使用 `this.getState`。
* @zh
* 获取指定的动画状态。<br>
* **即将弃用**,请使用 [[getState]]。
*/
public getAnimationState (name: string) {
return this.getState(name);
@@ -285,11 +286,12 @@ export class AnimationComponent extends Component implements IEventTarget {
}
/**
* 添加一个动画剪辑到 `this.clips`中并以此剪辑创建动画状态。
* @zh
* 添加一个动画剪辑到 `this.clips`中并以此剪辑创建动画状态。<br>
* **即将弃用**,请使用 [[createState]]
* @param clip 动画剪辑。
* @param name 动画状态的名称,若未指定,则使用动画剪辑的名称。
* @returns 新创建的动画状态。
* @deprecated 请使用 `this.createState`.
*/
public addClip (clip: AnimationClip, name?: string): AnimationState {
if (!ArrayUtils.contains(this._clips, clip)) {
@@ -305,10 +307,10 @@ export class AnimationComponent extends Component implements IEventTarget {
* But if force is true, then will always remove the clip and any animation states based on it. If clip is defaultClip, defaultClip will be reset to null
* @zh
* 从动画列表中移除指定的动画剪辑,<br/>
* 如果依赖于 clip 的 AnimationState 正在播放或者 clip 是 defaultClip 的话,默认是不会删除 clip 的。
* 但是如果 force 参数为 true,则会强制停止该动画,然后移除该动画剪辑和相关的动画。这时候如果 clip 是 defaultClip,defaultClip 将会被重置为 null。
* 如果依赖于 clip 的 AnimationState 正在播放或者 clip 是 defaultClip 的话,默认是不会删除 clip 的。<br/>
* 但是如果 force 参数为 true,则会强制停止该动画,然后移除该动画剪辑和相关的动画。这时候如果 clip 是 defaultClip,defaultClip 将会被重置为 null。<br/>
* **即将弃用**,请使用 [[removeState]]
* @param {Boolean} [force=false] - If force is true, then will always remove the clip and any animation states based on it.
* @deprecated 请使用 `this.removeState`.
*/
public removeClip (clip: AnimationClip, force?: boolean) {
let state: AnimationState | undefined;
+10 -5
View File
@@ -145,11 +145,12 @@ export function clampf(value: number, min_inclusive: number, max_inclusive: numb
* 限定浮点数的取值范围为 0 ~ 1 之间。
*
* @param value
* @return
* @example
* var v1 = cc.misc.clamp01(20); // 1;
* var v2 = cc.misc.clamp01(-1); // 0;
* var v3 = cc.misc.clamp01(0.5); // 0.5;
* ```typescript
* let v1 = cc.misc.clamp01(20); // 1;
* let v2 = cc.misc.clamp01(-1); // 0;
* let v3 = cc.misc.clamp01(0.5); // 0.5;
* ```
*/
export function clamp01 (value: number) {
return clampValue01(value);
@@ -163,7 +164,11 @@ export function clamp01 (value: number) {
* @param b number B
* @param r ratio between 0 and 1
* @return
* @example {@link utils/api/engine/docs/cocos2d/core/platform/CCMacro/lerp.js}
* @example
* ```
* let v1 = cc.misc.lerp(2,10,0.5); // 6;
* let v2 = cc.misc.lerp(2,10,0.2); // 3.6;
* ```
*/
export function lerp (a: number, b: number, r: number) {
return lerpUtil(a, b, r);
-1
View File
@@ -369,7 +369,6 @@ export default class LoadingItems extends CallbacksInvoker {
* !#en Complete an item in the LoadingItems queue, please do not call this method unless you know what's happening.
* !#zh 通知 LoadingItems 队列一个 item 对象已完成,请不要调用这个函数,除非你知道自己在做什么。
* @method itemComplete
* @static
* @param {Object} item The item which has completed
*/
static itemComplete (item) {