espace

Members
  • Content count

    337
  • Joined

  • Last visited

  1. format json problem

    ok i understand what you mean => as we say the coin is fall => problem solved thanks
  2. format json problem

    Because I have developed an editor to configure my levels. I use dat.gui and I could publish the parameters of my enemies to my email. What I doesn't understand is why I have this syntax : \"parameter"\
  3. hi, I use this function to to set the storage : var logic_position=function(sprite){ if (debug_position){ hero.grid.visible=false ; var _table; var _name_json; switch(sprite.name){ case 'canon': _table=c; _name_json='canon'; _table[sprite.number] = { number:sprite.number, delay:Math.round(sprite.delay), x:Math.round(sprite.x), y:Math.round(sprite.y), speed:Math.round(sprite.speed), frequency:Math.round(sprite.frequency), variance:Math.round(sprite.variance), angular:Math.round(sprite.angular), _flag:sprite._flag, kill_with_world:sprite.kill_with_world, special_color:sprite.special_color, _rotate:sprite._rotate, _value_rotate:sprite._value_rotate, }; break; } this.level=level_number; this.name_level='lev'; this.combined_level=this.name_level+this.level; localStorage.setItem(_name_json+sprite.number+this.combined_level, JSON.stringify(_table[sprite.number]),null,"\t"); } }; console.log(localStorage) The result of the localStorage is this : { "canon0lev0": "{\"number\":0,\"delay\":0,\"x\":200,\"y\":840,\"speed\":2000,\"frequency\":60,\"variance\":20,\"angular\":180,\"_flag\":false,\"kill_with_world\":true,\"special_color\":false,\"_rotate\":false,\"_value_rotate\":10}" } And what i want is this : { canon0lev0:{ number:0, delay:0, x:200, y:840, speed:2000, frequency:60, variance:20, angular:180, _flag:false, kill_with_world:true, special_color:false, _rotate:false, _value_rotate:10} } } However i follow this link to format my json but it's not the result expected https://stackoverflow.com/questions/2614862/how-can-i-beautify-json-programmatically What i must do to have the result expected...
  4. hi, I don't really understand...who choose the bundle id ? Me or it' trough the playstore or trough iTunes when i publish my game ? Sorry but on the net i have the 2 solutions so i ask to experts ...
  5. [Construct 2] Basket Slam Dunk

    same comment
  6. weapon send a signal each time the weapon fire ?

    exactly what i needed. Thanks and a love for you because you don't have a lot
  7. hi mattstyles, when canvasplus read the index.html if in the src tag there is a file with syntax problem (eg: let value="hi") cocoon crash. So i imagine a thing like this, but unfortunately that don't work <script window.isCanvasPlus = true></script> <script !window.isCanvasPlus && src="src/webview_main.js"></script> <script window.isCanvasPlus && src="src/canvas_main.js"></script> have you a better idea ?
  8. hi, i have made a weapon based on this example : https://phaser.io/examples/v2/weapon/asteroids by reading the doc i don't find exactly how to send a signal each time the weapon fire . In fact i would play an animation each time the weapon fire. actually i use the same frequency of my weapon to play this animation but it's not a good solution in long-term.
  9. hey guys, finally i have discover what don't work in my game this snippet is unsupported by canvas+, it's on the doc => webworker. guit.parameter.onChange(function(value){ args[0].fire(); logic_position(args[0]); }); thanks also to icp for your plugin it works. A simple question is there a way to maintain this code on my main.js and by a way when on canvas+ disable this snippet to avoid black screen ?
  10. Canvas size did not change after setUserScale

    On my template check the code in index.html and in main.js => boot
  11. Newbie to phaser ( I need someone to help me plss)

    follow my template it"s a good begin especially the article : learn javascript in 5 minutes
  12. update : correcting style syntax with http://jshint.com/ add some advices to canvas+ and usefull tools for chartboost i put it later.
  13. Hi, I don't find the information on the net so : wich version of javascript(ES5, ES6 ???) is supported trough canvasplus on cocoon.io ? by test i know that these snippets are not supported when i launch my game on canvas+ : var myFunc=()=>{}; let variable; const anothervariable; Could you tell me more about that...
  14. hi, i use http://jshint.com/ to visualize my errors of syntax and it say that a semi-colon is missing in this line: game.time.events.add( time_appears_enemies,function(){this.flag_wait_before_fire=true},this); Have you an idea ?
  15. having some problem with both cordova.js, chartboost and webview... chartboost + canvas =>ok chartboost+ webview+=> ok chartboost+ webview=> no-ok is anybody a good remplate who works with webview and chartboost ? so i could put another update of my template