Game Development Reference
In-Depth Information
One last thing for the
Gizmos
: if we want to see our gizmos in the game scene, we can click
on the
Gizmos
tab on the top-right corner of the game scene:
Creating a key and door
In this step, we will create the finish point, which is the door in this case. We will also create
a
Trigger Collider
, which makes it so that the player can't end the game if he/she didn't
collect our item; of course it's the key to our door.
Prepare for Lift Off
Let's prepare and make sure that we have all the graphics that we need; go to the
Graphics
folder in the
Project
window, and make sure in our subfolder
Level
, we have
doorClose.png
,
doorOpen.png
, and
key.png
. Let's get start.
Engage Thrusters
Here, we will create the object's
Key
and
Door
. Let's do this as follows:
1. Let's create the new material for our key, so go to
Assets
|
Create
|
Material
, name
it
M_Key
, and set the following:
Shader
:
Transparent
|
Cutout
|
Specular
Main Color
:
R: 255
,
G: 166
,
B: 0
,
A: 255
Specular Color
:
R: 236
,
G: 224
,
B: 26
,
A: 0
Shininess
: Drag the dragger almost to the right side
Base (RGB) TransGloss (A)
Drag-and-drop our
key.png
in the
Graphics/Level
to the texture
thumbnail in the material inspector: