yc8930143

显示图片

  var batman:egret.Bitmap = new egret.Bitmap( RES.getRes(\'hexo-huaheshang_png\'));
  batman.x = 0;
  batman.y = 20;
  this.addChild( batman );

改变图片显示深度(层级)

     var batman:egret.Bitmap = new egret.Bitmap( RES.getRes(\'hexo-huaheshang_png\'));
        batman.x = 0;
        batman.y = 20;
        this.addChild( batman );

        var batman1:egret.Bitmap = new egret.Bitmap( RES.getRes(\'hexo-huaheshang_png\'));
        batman1.x = 60;
        batman1.y = 60;
        this.addChild( batman1 );


        var batman2:egret.Bitmap = new egret.Bitmap( RES.getRes(\'hexo-huaheshang_png\'));
        batman2.x = 120;
        batman2.y = 80;
        this.addChild( batman2 );

        this.setChildIndex(batman1, this.getChildIndex( batman2 )); // 获取batman2 深度 给batmain1

Tween 动画

  this.stage.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
  egret.Tween.get(batman).to({x: batman1.x}, 300, egret.Ease.circIn )
  egret.Tween.get(batman1).to({x: batman.x}, 300, egret.Ease.circIn )

  egret.Tween.get( batman1 ).to( {scaleX: .4, scaleY:.4, alpha: .3}, 300, egret.Ease.circIn).to({scaleX: 1, scaleY: 1, alpha: 1}, 300, egret.Ease.circIn)
  
  }, this);


声音

  var sound:egret.Sound = RES.getRes(\'jimp_mp3\'); sound.play();

手册

文档
命令行手册

  • UI扩展库 旧版GUI 新版EUI

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-08
  • 2021-12-28
  • 2021-04-20
  • 2021-08-20
  • 2021-12-31
  • 2021-09-09
猜你喜欢
  • 2021-06-13
  • 2021-05-31
  • 2021-09-22
  • 2021-07-26
相关资源
相似解决方案