首页 > 其他 > 详细

egret 自定义类的方法

时间:2020-02-23 20:37:01      阅读:118      评论:0      收藏:0      [点我收藏+]

egret 自定义类的方法

 

class Jingling extends egret.Bitmap{
     name;
    public constructor(){
        super();
    }
   
}

  

   let icon: Jingling = this.createBitmapByName("egret_icon_png");
        icon.anchorOffsetX = icon.width / 2;
        icon.anchorOffsetY = icon.height / 2;
        icon.name = 233;
        console.log(icon.name);
        this.addChild(icon);
        icon.x = 326;
        icon.y = 233;

  

egret 自定义类的方法

原文:https://www.cnblogs.com/newmiracle/p/12354030.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!