美文网首页
cocos creator type 模拟二维数组

cocos creator type 模拟二维数组

作者: 凡凡的小web | 来源:发表于2021-01-20 10:32 被阅读0次
    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/

    相关文章

      网友评论

          本文标题:cocos creator type 模拟二维数组

          本文链接:https://www.haomeiwen.com/subject/deahzktx.html