luotuo

Members
  • Content Count

    8
  • Joined

  • Last visited

About luotuo

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Is very useful, chanks you.
  2. solved StatusBar.topContainer = this.add.container(0, this.sys.game.config.height - this.height); StatusBar.topContainer.setSize(this.sys.game.config.width, this.height); StatusBar.topContainer.key = "top_Container"; StatusBar.topContainer.setInteractive(); this.input.setDraggable(StatusBar.topContainer); //new Phaser.Geom.Rectangle(0, this.sys.game.config.height-this.height, this.width, this.height), Phaser.Geom.Rectangle.Contains this.tagUpdate("paper_0"); this.scene.bringToTop(); StatusBar.topContainer.on('mousemove', function(pointer, gameObject) { console.log('gameobjectover ' + "topContainer"); }); StatusBar.topContainer.on('gameobjectout', function(pointer, gameObject) { console.log('gameobjectout ' + "topContainer"); }); StatusBar.topContainer.on('dragstart', function(pointer, gameObject) { console.log('dragstart ' + "topContainer"); }); StatusBar.topContainer.on('drag', function(pointer, gameObject, dragX, dragY) { console.log('drag ' + "topContainer"); }); StatusBar.topContainer.on('dragend', function(pointer, gameObject) { console.log('dragend ' + "topContainer"); }); StatusBar.topContainer.on('pointerover', function(pointer, gameObject) { console.log('pointerover ' + "topContainer"); }); StatusBar.topContainer.on('pointerout', function(pointer, gameObject) { console.log('pointerout ' + "topContainer"); });
  3. This is my app, use phaser3. the red line area is in one top container . I would like the area move left and right by user finger。 A container How to listen drag even? This is my code, but is not work. StatusBar.create = function() { this.events.on('resize', this.resize, this); this.buttomBanner(); StatusBar.topContainer = this.add.container(0, this.sys.game.config.height - this.height); StatusBar.topContainer.setInteractive(); StatusBar.topContainer.on("drag", function(pointer) { console.log("hit"); }); this.tagUpdate("paper_0"); this.scene.bringToTop(); } }
  4. solved: this.add.displayList.removeAll();
  5. In some station, I would like to remove all display object from scene, and then add some other display object in the scene. but I dont know how to do it.