C# Coding for Unity game

In this week of my FMP I have been working on modelling, coding and putting the game together as a whole. I have unfortunately had my original files for my game corrupted and could not recover the code but since I have done it before I have been remembering it as best as I can to put together my game on its code. Fortunately my game is designed to not be heavily dependant on using lots of code as I have decided to focus on the 3d modelling so the code in my game is not anything extremely advanced.

simple code 2

I have been remaking my code and implementing it into my game, for my code I need only four things to happen to make the game work. One is to have my character move, two is to have my buttons work in the game, three is to make a trigger so that when the player moves on an object they get taken to the next scene and last of all is the audio, I need the audio to sound right and function at the times I want it to. My audio is just speaking as the voice which talks to Arthur and tell what he must do to prove he is the one true king.

simple code 1

I have gotten my controls working for the player’s movement and have also gotten the buttons to work again if they need to go to another scene. However I have not gotten the trigger to work to go to another scene when I collide with an object, for example if I collide with a door I want to go to a scene which lets me walk outside. I also need to put in a script so that my audio works in the game as to when I want it, for example if I go to another scene I want the audio to tell the player what to do next. I will be working on this over the holyday week to make sure that it all works and comes together like originally had in the game before it was unfortunately corrupted.

simple movement code