In this lab you are going to make a very simple game. The player moves around in a 2D world gathering ‘treasures’. When each treasure is touched, it disappears.
Design
Before you begin programming, take some paper and draw a storyboard of what your game will look like. Make sure you show all the important events in the game:
- How does the player object move? What keys control it?
- How do treasures respond to the player? How will you tell if the player is touching them?
Prototype 1 – The Player
You first prototype is to make a model in the world and give it a script that allows the player to control its movement with the keyboard. How it moves it up to you to decide. You can use the script from the Wednesday lecture as your starting place.
Prototype 2 – The Treasures
Add some treasure objects to the world. Add a script to them that makes them disappear if the player gets close.
You can make a game object disappear by setting its active property to false:
gameObject.active = false;
No Comments so far ↓
There are no comments yet...Kick things off by filling out the form below.
You must log in to post a comment.