Search the Community
Showing results for tags 'recursive'.
-
I keep changing my avatar. A character defect? ? Anyway I created it using BJS: https://www.babylonjs-playground.com/#SVZL1I#3 https://www.babylonjs-playground.com/#SVZL1I#4 I needed to take a break from long-term projects, so I did this instant gratification stuff. ? Take a look, they're short, fun, & tinkerable!
-
First of all, sorry for my english Hello! I'm trying to make a Arkanoid game on android Phaser. When the ball hits a brick, the brick disappears and the ball bounces well. Now I have two types of bricks, a normal brick, brick and TNT brick. I've implemented that when the ball touches a TNT brick, kill adjacent bricks too, but when one of those adjacent bricks is a TNT brick, it must call the same function recursively, but something does not work ... any idea? here is my function:
- 1 reply
-
- phaser
- javascript
- (and 6 more)
-
Hi everybody, i'm testing phaser since a few days ago and i am quite happy. But I've got a little problem, so I hope for your help. I'm coding a simple plattform game (some kind of doodle jump) and in the update-method i check if the player and the plattformGroup collide. Inside this CollisionCallback i'd like to check if the player and a sprite of the coinGroup overlap and call another function if thats true. I think it's way more performant to just check the coin-collision if the player stands on the plattform than every frame, even if he is jumping in the air (in this chase he souldn't get any coins, even if they overlap). update: function() { //... game.physics.arcade.collide(player, plattformGroup, this.plattformCollision); //...}plattformCollision: function (tPlayer, tPlattform) { game.physics.arcade.overlap(tPlayer, coinGroup, this.collectCoins) //...}collectCoins: function (tPlayer, tCoin) { //...}I've read that the overlap/collide-Function aren't recursive, so that's why i can't call any function inside the collisionCallback? Any clous how i shoud solve this problem? Thanks for the great framework and the help. midda PS: I hope this isn't a repost, but i haven't found anything like this.