Jump to content

Search the Community

Showing results for tags 'Listener sprite tilemap event'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Hey, I'm actually a beginner in phaser and I try to do a based turn game. I have some problems with listener. I have sprites that have a same type listener and I don't want to do 1 listener for 1 sprite. I saw some topic who use tab and group but i didn't really get it. I actually tried to pass the sprite as the argument of the listener but it seems that it doesn't work. So the goal is to make move an unit. So I did two listener one to select the sprite and an another to make the unit move. So (sorry variable and comments are in french): //Sprite du chiens1 = this.moteur2.add.sprite(0, 250, 'Chien'); //Listener sur le sprite s1s1.inputEnabled = true;s1.events.onInputDown.add(spriteInputListener, this); s2 = this.moteur2.add.sprite(200, 400, 'Chien');s3 = this.moteur2.add.sprite(0, 500, 'Chien'); //Si cette fonction est appelé cela veut dire que//le sprite s1 est selectionnéfunction spriteInputListener() { // Listener sur un clic gauche sur la carte this.moteur2.input.onDown.add(mouvement, this)} function mouvement() { //On place le sprite là où le clic à était fait s1.reset(this.marker.x, this.marker.y); //On coupe les listeners pour stopper la selection this.moteur2.input.onDown.removeAll(); } So I want that s1, s2, s3 have the same listener. Hope you will help me And sorry for my english xD
×
×
  • Create New...