Different Boost Approach

During the challenge where you make the game pretty and tune things up I actually had the idea of a boost, but instead of it being bound to a key command, I implemented some Sonic the Hedgehog type boosters. Basically some little arrows that, when you pass through them, it gives you a little boost, so I actually did the second challenge before I even knew it was a challenge.

I ended up using “GameObject.Find()” to access the SurfaceEffector2D. The code is:
SurfaceEffector2D = GameObject.Find(“Level Sprite Shape”).GetComponent< SurfaceEffector2D >();

I also implemented a slow down when you land. It made sense to me as you typically slow down a bit when you land from a jump due to friction.

I added a couple boosters to the last jump to really give it some punch and make it feel like a climax.

All in all, I’m pretty proud that I thought of that and found the code I needed well before it was even brought up in the course.

Privacy & Terms