willis

Members
  • Content Count

    3
  • Joined

  • Last visited

  1. Hi I'm new phaser user i got a little bug for my game, this things make me confused for an hour. I make mahjong game using phaser 3, the gameplay it's self are already completed, just add additional features. I make hint function to detect possible matches, and it's working fine also selected pieces that are match are right, but if i want to clear selected pieces (hint object), sometimes it's pick the wrong pieces, i already put selected hint id (array) on console.log, and nothing wrong. If i pick gameobject by id (custom properties) dirrectly, sometimes it's pick a different gameobject id. var child = this.cards.getChildren(); for(var i=0; i<2; i++){ child[hinted_pieces[i]].clearTint(); } If i use loop to pick hinted object, it's select the right gameobject. var count = 0; for(var i=0; i<total; i++){ if(child[i].id == hinted_pieces[count]){ child[i].clearTint(); count++; } if(count == 2){ break; } } So, it's Phaser 3 bugs?
  2. Hi I'm new to phaser, i don't know how to get object properties on click, the result is 'undefined' instead of 8888. I use single object/sprite that not grouped and work fine. create(){ this.cards = this.add.group(); var count = 1; for(var y=1; y<5; y++){ var x_space = 70; var y_space = 100; var y_count = 0; for(var x=1; x<10; x++){ if(count <= 36){ this.cards.create(50+(x_space*x), 100+(y_space*y), 'card_'+count).setInteractive(); this.cards.val = 8888; } if(x==10){ y_count++; } count++; } } this.input.on('gameobjectdown', function(pointer, gameObject){ console.log(gameObject.val); }); } Thanks Solved http://labs.phaser.io/edit.html?src=src\input\game object\destroy sprite on down event.js
  3. willis

    [ASK] Licensing HTML5 game

    Hi i have plan to licensing my HTML5 games, and i have a question before doing this. If you licensing your game (ex: someone or a company send a message for game licensing), do you keep your js minify or if your game made with game engine like Construct 2 or Game maker do you include source file? Thank you! have a nice day!