import { _decorator, Animation, Component, Node } from 'cc'; import Utilities from '../Utilities'; const { ccclass, property } = _decorator; @ccclass('StartScreenController') export class StartScreenController extends Component { @property({ type: Animation, visible: true }) private _animation: Animation; protected async start() { this._animation.play(); await Utilities.waitUntil(() => !this._animation.getState(this._animation.defaultClip.name).isPlaying); this._animation.play(this._animation.clips[1].name); } }