Search the Community
Showing results for tags 'collect'.
-
I am trying to create an adventure game. Very new to Phaser and Js. I've been through multiple tutorials and am now trying to make my way on my own. If you imagine a stage that can be returned to at any time, I need to know if the coins on that stage were collected before. I can write individual functions for each coin successfully: var State1 = { preload: function(){ game.load.image('coin','coin.png'); }, create: function(){ //note these vars are declared in Main state numCoins = 0; //the array that will tell me if the coin has already been collected. that check hasn't been written yet. coinsCollected = []; this.coinText =game.add.text(game.world.width-20, 30, numCoins, {font: "26px Amatic SC"}); //single coins to collect on the stage. trying 2 different ways to show, as button and as sprite this.coin1=game.add.button(600, 300, 'coin', this.getCoin1, this); var coin2 = game.add.sprite(350, 250, 'coin'); coin2.inputEnabled=true; coin2.events.onInputDown.add(this.getCoin, this); var coin3 = game.add.sprite(400, 100, 'coin'); coin3.inputEnabled=true; coin3.events.onInputDown.add(this.getCoin, this); }, getCoin1: function(coin){ numCoins ++; this.coinText.text=numCoins; //which coins have been collected coinsCollected.push('coin1'); console.log(coinsCollected); coin.kill(); }, getCoin2: function(coin){ numCoins ++; this.coinText.text=numCoins; coinsCollected.push('coin2'); console.log(coinsCollected); coin.kill(); }, So that works fine, but obviously I don't want to write out a hundred "getCoin" functions. How do I pass the name of the coin to a single getCoin function so I can store it in an array? so getCoin: function(coin){ numcoins ++; this.coinText.text=numCoins; coinsCollected.push(coinNAME); }
-
Pymp Pymp is a colorful, fast-paced arcade game with two game modes. In the first mode, "Avoid Mode", you have to avoid the rectangles and collect the triangles in order to proceed. In the second mode, "Collect Mode", you have to pass through rings. If you make one mistake in either mode, the run is over! I tried to make the game challenging enough for most players. As you progress through the levels, the colors, designs and difficulty change. Try to reach as far as possible, it's worth it! As a side note, the graphics are made using only the drawing functions of the Canvas 2D API. No external images or 3D libraries are used. You can play the game here: http://www.kongregate.com/games/Diamonax/pymp http://www.newgrounds.com/portal/view/697620 I really hope you guys enjoy it!
-
Spaceix is a simple and addictive endless runner game. Control the little rockets gliding through a beautiful exotic world. Collect coins and unlock cool in game rockets. Relaxed in the calm, zen-like background music. Hold and release so that the rockets takes off. Move away from the obstacles and pick up as many coins as you can.You get a score by traveling through the rings.The coins you pick up you can use in the game to buy rockets. Collect all the 40+ rockets. Be careful not to hit any obstacle or you will have to start again the game. Download on google play for free: https://play.google.com/store/apps/details?id=com.erkokos.spaceix .
- 1 reply
-
- spaceships
- space
- (and 15 more)
-
Hello to everybody, I wanted to share with you my first HTML5 game! The idea behind the game is very simple: collect all the coins you need in order to pass the level before the time expires. Sound simple? No it's not, it's actually very challenging and you will probably hate and love this game at the same time (but please just don't blame me if you will eventually drop your macbook pro out of the window). You can play it and/or get more informations trough this link. I'm looking forward to get some feedback from this community, please give me your suggestions. At present I'm selling it on www.fgl.com (is it a good way? I have no idea) where the game has been approved and rated with a score of 7 out of 10.
-
Hi all. This is my first ever HTML5 game. Your goal in the game is to collect as many monsters as you can during three rounds. Different monsters are worth different amounts. Below are some screens. I would love your feedback on this game. I always strive to create the best games possible. If anyone is interested in a license of the game you can PM me or send an email to contact at karmaoctopus.com Game link: http://m.karmaoctopus.com/monstercollector/