Chapter 3: Create Gold Rush Game by Unity

Well come back! This is the final part of Gold Rush Game. Gamemakerlab sures that after you finish all of parts, you will have a completed Gold Rush Game. It's really happy because of it be created by yourself.

Part 5: Now, we will work with trigger golden. Create Gold.script -> Drag and Drop it into ObjectGameGoldBig or another Object which hook could touch

It means that we will get collider when hook touches Object such as gold, diamond…ect. Then, Hook will be stopped and gold will be pulled by hook, surely.

Note: Destroy gameObject gold when hook stay at typeAction pause


 

                     

Images 11+12: Code describes the Gold.script

 Basically, we completed these periods of gold rush game. Next step, We will make cooldown time to calculate game time and game score.

Part 6: Cooldown time and score Game Play. In the Hierarchy -> create objectgame empty-> Rename as GamePlay-> Create script GamePlay.scritp .Then, drag and drop it into Objectgame GamePlay.


In this Script, we will initiate time for game to calculate scores when you pull a diamond or gold successfully


  

                    

  Images 13 + 14: Code describes GamePlay.script

Besides that we add code on Gold.script:

 


 Image 15: Supplementary Code

It uses to calculate score of Object which is pulled such as: biggold equal to 50, smallgold equal 30 …etc

Congratulation! You recently finish this easier level of Gold Rush Game. The other levels will be completed by the same direction. So, you could try to make this game and enjoy it. If you feel that it is really useful, don’t forget to subscribe, like and share for your friends.