Game Development Reference
In-Depth Information
7. Then, we duplicate the
Floor
object by pressing
Ctrl
+
D
(on Windows) or
com-
mand
+
D
(on Mac) and set the second
Floor
object and change the transform po-
sition as follows:
Transform
Position
X
:
0.25
,
Y
:
11
, and
Z
:
0
Next, we will set the
Wall
object, click on this object, and add the
Box Collider
2D
by going to
Component
|
Physics2D
|
Box Collider 2D
. Then, we will go to
Inspector
and set it as follows:
Transform
X
:
-14
,
Y
:
-1.46
, and
Z
:
0
Position
X
:
5
,
Y
:
5
, and
Z
:
1
Scale
Sprite Renderer
Order in Layer
1
Box Collider 2D
Material
Edge
(drag the Physics 2D Material here)
8. Then, we duplicate the
Wall
object by pressing
Ctrl
+
D
(on Windows) or
com-
mand
+
D
(on Mac) three times and set the second, third, and fourth
Wall
object
and change the transform position as follows: