Jump to content

IKStreamIvo

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by IKStreamIvo

  1. Thanks so much!
  2. I have a sprite using (arcade) physics and I'm setting velocity to move around. When the player overlaps with a weapon, you can press a key to pick it up. I want the gun to be at an offset-ed position to the player and follow it around.. I thought parenting it was the easiest, but I can't figure out how to do it. Can anyone help me with this? ?
  3. ... Turns out it is as easy as: var deck1 = game.cache.getJSON('cards0'); var deck2 = game.cache.getJSON('cards1'); var fullDeck = deck1.concat(deck2);
  4. Hey, I am working on a game that fetches an unknown amount of json files from a webserver. When everything is parsed, I need to combine everything in one big json object. //for loop game.load.json('cards' + i, deckStorageLink + decksData[i][0]); //while testing im only having two, 'cards0' and 'cards1' //different function var deck1 = game.cache.getJSON('cards0'); var deck2 = game.cache.getJSON('cards1'); var fullDeck = //deck1 and deck2 combined. so if I have [ { "country": "0", "points": "1", "action": "5", "description": "Draw two cards" } ] and [ { "country": "1", "points": "1", "action": "3", "description": "Steal a card" } ] I want [ { "country": "0", "points": "1", "action": "5", "description": "Draw two cards" } ] [ { "country": "1", "points": "1", "action": "3", "description": "Steal a card" } ] Does anyone know how to do this? -Ivo
×
×
  • Create New...