Stage.ts 291 B

12345678910
  1. const { ccclass, property } = cc._decorator;
  2. @ccclass
  3. export class Stage extends cc.Component {
  4. @property(cc.Texture2D)
  5. stage: cc.Texture2D = null
  6. start() {
  7. this.getComponent(cc.Sprite).spriteFrame=new cc.SpriteFrame(stage, new cc.Rect(0, 0, 720, 1280))
  8. }
  9. }