Making lives in Block Breaker

@Rob - I think I fixed it by making default and remaining lives static. As of now I can’t think of a reason they should not be static. I think that it works as a static confirms it was a persisting instance issue. What I don’t understand is that on the Win screen I made a button call to:

GameWin() {Destroy(this);}

…which should be the exact same as if the lose screen happens—but the counts persisted after a win this way. Making the counts static worked but I am still curious why my GameWin() method did not.

Pop a Debug.Log message in the GameWin() method and see if it outputs to the console under the situation you believe it is being called.

Again, I would need the full project to be of any more use. :slight_smile:

Rob–

Thanks again for all your help. Here is where I am at :stuck_out_tongue:

Brick Breaker

1 Like

No worries, we’re all learning afterall :smiley:

I often search online for coding solutions myself in various places so I’m happy that you have found this as quite useful and that Rob managed to help you :slight_smile:

1 Like

Hey Jason,

That’s looking really nice. I like the paddle/block sprites, very nice. Looks like you’ve added a few different mechanics to this already, the ball speed indicator is very unique. Nice work :slight_smile:

1 Like

Thanks, did some minor updates today as well. There are quite a few changes on ball behavior that are likely not noticed on short plays :). Kept ball speed constant and controlled to my conditions and the ball will react depending on where you hit it on the paddle. IE–if you are trying to get the ball into a gap on the right if you keep hitting on right side of the paddle you will at least get it going in the right direction.

I think i need to redo my level design. The phasing mechanic isn’t until level 6 and I don’t think most folks are getting to see that. :slight_smile:

Apologies for keeping this thread going beyond its natural life, haha. Here is link to the showcase thread for it. :slight_smile:

https://community.gamedev.tv/t/game-brick-breaker-with-phasing-mechanic/45319/4

1 Like

I will check it out and play it a little more! :slight_smile: I had limited time the other day, sorry…

Privacy & Terms