Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,256 --> 00:00:05,120
Before we add any new content to our game we should address some problems that we have
2
00:00:05,376 --> 00:00:05,888
With RC
3
00:00:06,656 --> 00:00:09,472
In the problems that I'm talking about by the fact that ability
4
00:00:09,728 --> 00:00:11,008
Vials and enum
5
00:00:11,520 --> 00:00:13,056
Are all just kind of Ronin
6
00:00:13,312 --> 00:00:14,336
Is children under 9
7
00:00:14,592 --> 00:00:15,616
This may note
8
00:00:15,872 --> 00:00:18,688
And well that someone works we have a number of Prague
9
00:00:19,968 --> 00:00:21,504
My instance and enum
10
00:00:22,016 --> 00:00:22,784
For demonstrate
11
00:00:23,040 --> 00:00:23,552
Purposes
12
00:00:23,808 --> 00:00:24,576
You can see them
13
00:00:24,832 --> 00:00:27,904
The enemy or render on top of the player always
14
00:00:28,416 --> 00:00:30,464
Because it's lower on the tree
15
00:00:30,720 --> 00:00:31,744
Then the player
16
00:00:33,024 --> 00:00:35,328
And this is not exactly correct
17
00:00:35,584 --> 00:00:38,912
It will look like the players always behind the enemy even when the enemy
18
00:00:39,168 --> 00:00:41,472
Is supposed to be behind the player
19
00:00:41,728 --> 00:00:44,544
And that will also be a problem for hr
20
00:00:44,800 --> 00:00:46,848
Abilities so if I take a sort of building
21
00:00:47,104 --> 00:00:50,944
This will just render on top of everything that is below it in the sea
22
00:00:51,456 --> 00:00:55,040
And so we can have a situation which enemies are obscuring
23
00:00:55,296 --> 00:00:56,064
The ability
24
00:00:56,576 --> 00:00:59,904
That's not good because we want to be able to see what our abilities are doing
25
00:01:00,123 --> 00:01:02,491
Subtitled by
online-courses.club
We compress knowledge for you!
26
00:01:02,492 --> 00:01:01,696
And so we can resolve
27
00:01:01,952 --> 00:01:02,464
Problem
28
00:01:02,720 --> 00:01:04,512
By creating a couple of new now
29
00:01:05,024 --> 00:01:08,096
So I'm going to go ahead and create a node 2D under me
30
00:01:08,608 --> 00:01:11,680
Something hit control 8 open up the add no dialogue
31
00:01:11,936 --> 00:01:13,984
Recall this one entities
32
00:01:14,240 --> 00:01:16,544
And then I'm going to create another note to
33
00:01:16,800 --> 00:01:18,080
And I'm going to call this one
34
00:01:19,360 --> 00:01:22,944
And foreground would just be used for anything that we want to render above the
35
00:01:23,712 --> 00:01:25,504
I'm going to take my player in drag
36
00:01:25,760 --> 00:01:26,528
Into the
37
00:01:26,784 --> 00:01:29,856
Make sure you've got this order with a tilemap
38
00:01:30,112 --> 00:01:31,904
Is first an any entities in it
39
00:01:32,672 --> 00:01:34,464
So get the player as a child of
40
00:01:35,488 --> 00:01:36,512
Now watch me whip
41
00:01:36,768 --> 00:01:40,608
I'm going to go to the inspector here in the entities layer
42
00:01:40,864 --> 00:01:42,656
And I'm going to go to the ordering sex
43
00:01:42,912 --> 00:01:44,448
And turn on Wi-Fi
44
00:01:44,704 --> 00:01:45,216
Enabled
45
00:01:45,472 --> 00:01:46,752
So where do I sort in a
46
00:01:47,264 --> 00:01:48,032
I can
47
00:01:48,288 --> 00:01:50,336
For demonstration purposes you don't have to do this
48
00:01:50,848 --> 00:01:52,384
Instance of basic enemy Hero
49
00:01:52,640 --> 00:01:53,920
And I can drag this
50
00:01:54,432 --> 00:01:58,016
And you can see that does not rendering behind the player despite the fact that it is
51
00:01:58,528 --> 00:02:00,320
Lower than the player on the team
52
00:02:01,088 --> 00:02:03,392
If I move it past the players by position
53
00:02:03,648 --> 00:02:05,440
It now renders on top of the
54
00:02:05,952 --> 00:02:09,280
My sword does it controls the drawer or
55
00:02:09,792 --> 00:02:11,072
I've known to
56
00:02:11,584 --> 00:02:12,352
Based on
57
00:02:12,608 --> 00:02:13,120
Why
58
00:02:13,376 --> 00:02:13,888
Position
59
00:02:14,144 --> 00:02:14,912
So when
60
00:02:15,424 --> 00:02:17,472
An entity's y position
61
00:02:17,728 --> 00:02:20,544
Is greater than others it will render
62
00:02:20,800 --> 00:02:21,568
On top of
63
00:02:22,080 --> 00:02:24,128
This gives the impression of Dad
64
00:02:24,640 --> 00:02:25,152
When were
65
00:02:25,408 --> 00:02:27,712
Working with 2D top-down games
66
00:02:27,968 --> 00:02:28,480
Which we
67
00:02:28,992 --> 00:02:30,272
I'm going to delete that anime
68
00:02:30,528 --> 00:02:35,648
And so we want to put entities and vials on this level we need to know how to access
69
00:02:35,904 --> 00:02:38,464
Is this later and what we're going to do is just simply going to
70
00:02:38,720 --> 00:02:42,048
A group against all this is later I'm gonna go click on
71
00:02:42,304 --> 00:02:43,584
And then go to the new tab
72
00:02:43,840 --> 00:02:44,352
Stencil
73
00:02:44,608 --> 00:02:45,120
Groups
74
00:02:45,376 --> 00:02:46,912
And then I'm just going to add this to
75
00:02:47,424 --> 00:02:48,448
The entities group
76
00:02:48,704 --> 00:02:51,264
And I'm actually going to call this entities layer
77
00:02:51,776 --> 00:02:56,896
Just to be extra sure that this is referring to a notice single note
78
00:02:57,152 --> 00:02:58,688
And not to a group of
79
00:02:59,200 --> 00:02:59,968
That can be a little
80
00:03:01,248 --> 00:03:02,528
Recall that entities layer
81
00:03:02,784 --> 00:03:03,552
In the group there
82
00:03:03,808 --> 00:03:06,112
And then we're going to go into our enemy manage
83
00:03:06,368 --> 00:03:07,136
Open up
84
00:03:07,392 --> 00:03:12,000
Script and in here what we're doing is her simply just adding the child to the main
85
00:03:12,256 --> 00:03:14,048
By getting the parent in an element
86
00:03:14,304 --> 00:03:16,352
What we're going to do instead is ringing to say
87
00:03:18,400 --> 00:03:19,680
Bar Anthony's lair
88
00:03:20,448 --> 00:03:21,472
Is equal to
89
00:03:21,728 --> 00:03:22,240
Tree
90
00:03:22,496 --> 00:03:23,008
Get
91
00:03:23,264 --> 00:03:24,288
First node in
92
00:03:25,056 --> 00:03:27,616
And then we need to use that name their entities layer
93
00:03:29,920 --> 00:03:32,480
Now we could do some defensive programming here
94
00:03:32,736 --> 00:03:35,552
And you're checked to make sure that this entity's layer exist
95
00:03:35,808 --> 00:03:38,880
I'm not going to do that in this instance because
96
00:03:39,136 --> 00:03:42,720
I feel pretty confident that entities layer is going to always eggs
97
00:03:42,976 --> 00:03:44,000
In the context
98
00:03:44,256 --> 00:03:45,536
Having an enemy man
99
00:03:46,816 --> 00:03:48,864
We're gonna keep this entities later here
100
00:03:49,120 --> 00:03:51,424
An hour just going to replace this get parent
101
00:03:51,680 --> 00:03:52,192
Entered
102
00:03:52,704 --> 00:03:53,216
Leia
103
00:03:54,240 --> 00:03:56,032
And I just got a spell that correctly ok
104
00:03:56,288 --> 00:03:58,336
Fabulous and diesel Ireland
105
00:03:58,848 --> 00:04:01,920
And then let's hit ctrl shift l and search for the vile
106
00:04:02,176 --> 00:04:03,456
Component in open that
107
00:04:03,712 --> 00:04:05,504
And I'm here again we're just kind
108
00:04:05,760 --> 00:04:06,272
Spawning
109
00:04:06,528 --> 00:04:09,344
Under the owners parent which again is the main theme
110
00:04:09,856 --> 00:04:10,624
So we're going
111
00:04:10,880 --> 00:04:12,160
Spine the Vial instead
112
00:04:13,184 --> 00:04:13,952
To the edge
113
00:04:14,720 --> 00:04:17,280
So I'm going to pierce that line that we copied
114
00:04:17,536 --> 00:04:19,583
Entities layer Eagles get 3D
115
00:04:19,839 --> 00:04:20,607
Get first node in group
116
00:04:20,863 --> 00:04:23,935
And then just replace this line owner get parent with
117
00:04:24,191 --> 00:04:24,959
Entities
118
00:04:27,007 --> 00:04:30,591
In the final one we need to do is we need to handle the Sword of
119
00:04:31,103 --> 00:04:32,639
Something to go back to my main
120
00:04:33,151 --> 00:04:34,431
I'm going to click on the foreground
121
00:04:34,687 --> 00:04:35,711
Then I'm going to go to now
122
00:04:36,223 --> 00:04:37,759
Dislike groups again
123
00:04:38,015 --> 00:04:39,551
And I'm going to add it to
124
00:04:39,807 --> 00:04:40,575
Foreground
125
00:04:40,831 --> 00:04:41,343
Leia
126
00:04:41,599 --> 00:04:42,367
And an addict
127
00:04:43,135 --> 00:04:49,023
Ok then I'm going to open the sword ability controller so again control shift order quick open
128
00:04:49,279 --> 00:04:51,327
The Sword of bilty controller
129
00:04:51,583 --> 00:04:53,119
And in here again
130
00:04:53,375 --> 00:04:56,191
We are just adding the sword ability to the player
131
00:04:56,959 --> 00:05:01,567
Instead what we want to do as we want to grab the foreground layer so we're going to save our
132
00:05:01,823 --> 00:05:02,847
Foreground layer
133
00:05:03,103 --> 00:05:04,127
Putting a straight under
134
00:05:04,383 --> 00:05:05,919
Play The instantiate Light
135
00:05:06,175 --> 00:05:06,943
For the sort of
136
00:05:07,711 --> 00:05:09,247
Is it good to get tree
137
00:05:09,759 --> 00:05:11,807
Dart get first noting
138
00:05:12,319 --> 00:05:13,087
4 g
139
00:05:13,599 --> 00:05:14,111
Leia
140
00:05:14,623 --> 00:05:16,927
And then we can replace this player get parent
141
00:05:17,439 --> 00:05:18,207
Foreground layer
142
00:05:19,487 --> 00:05:21,279
Ok now let's go ahead and Run the game
143
00:05:21,791 --> 00:05:23,583
And make sure everything is working as we
144
00:05:24,095 --> 00:05:25,631
Ok and we can pause the game
145
00:05:26,143 --> 00:05:27,167
By clicking the pause
146
00:05:27,423 --> 00:05:28,959
1 appear in the towbar
147
00:05:29,215 --> 00:05:31,519
We can look at the remote scenery
148
00:05:32,031 --> 00:05:33,055
And see if everything's were
149
00:05:33,567 --> 00:05:38,175
So we should see no free-floating nodes in our remote scene three here
150
00:05:38,431 --> 00:05:40,735
And if we open up the end diesel Air Wick
151
00:05:40,991 --> 00:05:43,551
Steve Isles and enemies as well
152
00:05:43,807 --> 00:05:44,319
What's the player
153
00:05:44,575 --> 00:05:47,903
And in the foreground if you passed it while sword ability was happy
154
00:05:48,415 --> 00:05:49,695
You should see a sword
155
00:05:50,207 --> 00:05:51,487
So now we got a match
156
00:05:51,743 --> 00:05:52,255
Clean
157
00:05:52,511 --> 00:05:53,023
Scene
158
00:05:53,535 --> 00:05:56,863
And we've got proper why sorting and place so everything
159
00:05:57,119 --> 00:06:00,447
Ok so I'm going to unpause it and just verify that the wise sorting is
160
00:06:00,703 --> 00:06:03,775
Yes you can see as you run into enemies
161
00:06:04,287 --> 00:06:07,103
It makes a lot more sense in terms of the
162
00:06:07,359 --> 00:06:08,639
Draw order of
163
00:06:08,895 --> 00:06:09,407
Every
164
00:06:09,919 --> 00:06:12,991
So now we've got a proper scene structure in place
165
00:06:13,247 --> 00:06:15,039
For building Moreton
11079
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.