import { log, Component, JsonAsset, SpriteAtlas, SpriteFrame, warn, _decorator } from "cc";

const { property, ccclass, type } = _decorator;

@ccclass("TestClass")
export class TestClass extends Component {
    @property
    @type(SpriteAtlas)
    atlas: SpriteAtlas = null;

    onLoad(): void {
        log("================> start");
        for (let k in this.atlas.spriteFrames) {
            const frame = this.atlas.spriteFrames[k];
            log("-->" + frame.name);
        }
    }
}
