Api

AnimationutilsSetanimation

OpenAPI > AnimationUtils > setAnimation

OpenAPI.AnimationUtils.setAnimation() method

设置动画

Signature:

static setAnimation(object: GameSprite, aniID: number, complete?: Callback): void;

Parameters

Parameter

Type

Description

object

GameSprite

目标对象

aniID

number

动画编号

complete

Callback

(Optional) 回调

void

Example

const object = new GameSprite()
OpenAPI.AnimationUtils.setAnimation(object, 1, Callback.New(() => {
   console.log('动画播放完成')
}, this))

Copyright © 2021 - 2025