Unity Game

Standard

Today in Ant’s lesson i continued working on my 2D game. The first thing that i did was create a system where if the player touches an enemy the level will restart. To get the code for this i watched the coding videos on the college moodle. As well as reacting to enemy collision, i also made it so that when the player reaches the goal (in this case the exit door) the collision will start the next level – i have yet to add anything to this level however.

After achieving this i decided to add projectiles to the enemies. Through a few scripts(‘autofire’, ‘projectile’), rigidbodies, and a bullet prefab, i managed to do so. The enemy chefs now throw knives, i like how the knives react to the environment – bouncing off walls/getting stuck. The level is also restarts when the player touches one of the knives.

gif3.gif

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s