import { SpriteFrame, position, enable } from './../../creator.d';
const {ccclass, property} = cc._decorator;
@ccclass("mySpriteFrames")
export class mySpriteFrames{
@property({
type: [cc.SpriteFrame]
})
spriteFrames: Array<cc.SpriteFrame> = []
};
@ccclass
export default class NewClass extends cc.Component {
@property({
type: [mySpriteFrames]
})
spriteFrames: Array<mySpriteFrames> = []
}
使用getComponent("spriteFrames").spriteFrames1[step].spriteFrames
https://forum.cocos.org/t/type/38704/2
//CocosCreator+TypeScript 自定义数据类
https://blog.csdn.net/lvyan1994/article/details/81354499
// 错误Can not serialize because the specified type is anonymous
https://xmanyou.com/cocos-creator-ccclass-name/
网友评论