altergo

Members
  • Content Count

    9
  • Joined

  • Last visited

  1. I have the problem with the buttons even in CANVAS mode. Here is my game var game = new Phaser.Game(width,height, Phaser.CANVAS, 'game'); And the buttons for (var i = 0; i < 6; i++) { if(i%2==0) { this.button = this.add.button((25+90*i), (600), 'buttons', this.actionOnClick, this, 0); // this.button.anchor.setTo(-0.8, 0); } else { this.button = this.add.button((25+90*(i-1)), (785), 'buttons', this.actionOnClick, this, 0); } this.ans_text = this.add.bitmapText(60, -55, 'kuku', this.ans_style, 65); // bmpText = this.add.bitmapText this.button.addChild(this.ans_text); this.all_buttons.add(this.button); } And the Listener // what happens when i click the button actionOnClick: function (button) { var log; if(button.value==this.char_bubble.char_trans) { // right blocksound.play(); button.frame=1;} Nothing happens. I tried to switch of OpenGL on Cocoonjs launcher I use Cocoonjs 2.0.1 and phaser 2.0.4 Any suggestions?
  2. I have the problem with the buttons even in CANVAS mode. Here is my game var game = new Phaser.Game(width,height, Phaser.CANVAS, 'game'); And the buttons for (var i = 0; i < 6; i++) { if(i%2==0) { this.button = this.add.button((25+90*i), (600), 'buttons', this.actionOnClick, this, 0); // this.button.anchor.setTo(-0.8, 0); } else { this.button = this.add.button((25+90*(i-1)), (785), 'buttons', this.actionOnClick, this, 0); } this.ans_text = this.add.bitmapText(60, -55, 'kuku', this.ans_style, 65); // bmpText = this.add.bitmapText this.button.addChild(this.ans_text); this.all_buttons.add(this.button); } And the Listener // what happens when i click the button actionOnClick: function (button) { var log; if(button.value==this.char_bubble.char_trans) { // right blocksound.play(); button.frame=1;} Nothing happens. I tried to switch of OpenGL on Cocoonjs launcher I use Cocoonjs 2.0.1 and phaser 2.0.4 Any suggestions?
  3. Hi, I'm making a simple game with Phaser I have a spritesheet with two frames. I need an animation of sprite disappear, frame change and appear again like .to( {x:0, y:0 }, 600, Phaser.Easing.Bounce.Out); .frame = 1; .to( {x:1, y:1 }, 600, Phaser.Easing.Bounce.Out); How do i connect it into one chain? Thanks,
  4. Hi, I want to make a simple quiz game. I take an questions from array, and mix the option answers. Here is a function which creates a group of buttons: function addVariantsHtml(id) { var answer = new Array(); answer = getAnswersVariants(id); all_buttons = game.add.group(); for (var i = 0; i < 5; i++) { var button = game.add.button((100+30*i), (400+5*i), 'buttons', actionOnClick, this, 1, 0, 2); button.name = "button"+i; button.value = answer['trans']; button.char_id = answer['id']; var style = { font: "10px Arial", fill: "#000000", align: "center" }; var text = game.add.text(0, 0, answer['trans'], style); button.addChild(text); all_buttons.add(button); } } After every answer i call all_buttons.removeAll(); to delete the buttons, but the problem is that my addVariantsHtml create five inputHandlers (actionOnClick) Here is my questions: 1.Is it a right way to create a group of buttons? 2. What is the right way to delete ellements with unused handlers? Thanks,
  5. Didn't get an answer.. Where is this example about code organizing? and screens
  6. I think you can easily find a graphic designer student for a reasonable price and improve your graphic X2
  7. The concept is good - kind of billiard. Try to add some sound for better engagement.. Graphics also need to be improved.
  8. I can't find a good answer to this question. I want to create an HTML5 game with phaser framework and convert it into Android/iOS app (webview). The game suppose to work a lot with database (update, select) Do any one can suggest me the right way to work to be able after that to convert it with minimal time wasting? Thanks