[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:02.19,0:00:05.80,Default,,0000,0000,0000,,Chào mừng trở lại với loạt\Nvideo game scavengers. Dialogue: 0,0:00:05.80,0:00:07.80,Default,,0000,0000,0000,,Trong video trước, chúng\Nta đã xem xét thiết lập Dialogue: 0,0:00:07.80,0:00:10.50,Default,,0000,0000,0000,,dự án và trình diễn sản phẩm hoàn chỉnh. Dialogue: 0,0:00:11.44,0:00:13.74,Default,,0000,0000,0000,,Trong video này, chúng ta sẽ tạo animation Dialogue: 0,0:00:13.74,0:00:15.74,Default,,0000,0000,0000,,cho người chơi (player) và kẻ địch (enemy) Dialogue: 0,0:00:15.74,0:00:17.56,Default,,0000,0000,0000,,từ sprite sheet Dialogue: 0,0:00:17.56,0:00:21.03,Default,,0000,0000,0000,,và thiết lập player và enemy prefabs Dialogue: 0,0:00:21.57,0:00:23.57,Default,,0000,0000,0000,,Hãy tạo một new scene Dialogue: 0,0:00:26.90,0:00:31.07,Default,,0000,0000,0000,,và chúng ta sẽ bắt đầu tạo player prefab Dialogue: 0,0:00:31.07,0:00:33.34,Default,,0000,0000,0000,,cùng với animations của player Dialogue: 0,0:00:34.18,0:00:37.31,Default,,0000,0000,0000,,Chúng ta chọn Game Object - Create Empty Dialogue: 0,0:00:39.33,0:00:41.33,Default,,0000,0000,0000,,và chúng ta sẽ có bảng Player hiện ra Dialogue: 0,0:00:43.26,0:00:45.78,Default,,0000,0000,0000,,Trong folder Sprite \Nchúng ta có một sprite sheet Dialogue: 0,0:00:45.78,0:00:48.75,Default,,0000,0000,0000,,bây giờ chúng ta cắt nó Dialogue: 0,0:00:48.75,0:00:50.39,Default,,0000,0000,0000,,thành nhiều sprites nhỏ Dialogue: 0,0:00:50.39,0:00:52.93,Default,,0000,0000,0000,,Để biết thông tin thêm \Nvề sprite sheets và sprites Dialogue: 0,0:00:52.93,0:00:54.93,Default,,0000,0000,0000,,bạn có thể xem ở link bên dưới Dialogue: 0,0:00:55.31,0:00:57.31,Default,,0000,0000,0000,,Trong trường hợp này chúng ta sẽ lấy Dialogue: 0,0:00:57.31,0:01:00.15,Default,,0000,0000,0000,,frames đầu tiên Dialogue: 0,0:01:00.15,0:01:01.54,Default,,0000,0000,0000,,nó là player idle animation, Dialogue: 0,0:01:01.54,0:01:03.54,Default,,0000,0000,0000,,và tôi đã làm điều đó bằng việc \Nclick vào frame đầu tiên Dialogue: 0,0:01:03.54,0:01:05.73,Default,,0000,0000,0000,,và sau đó shift-clicking \Nđến farme cuối cùng mà tôi muốn Dialogue: 0,0:01:05.73,0:01:07.73,Default,,0000,0000,0000,,Tôi sẽ lấy những thứ này rồi bỏ chúng vào đây Dialogue: 0,0:01:07.73,0:01:09.19,Default,,0000,0000,0000,,tới player prefab Dialogue: 0,0:01:09.78,0:01:11.39,Default,,0000,0000,0000,,và sau đó ta đặt cho nó một cái tên Dialogue: 0,0:01:11.39,0:01:14.11,Default,,0000,0000,0000,,chúng ta sẽ gọi nó là PlayerIdle Dialogue: 0,0:01:14.11,0:01:15.88,Default,,0000,0000,0000,,Đây sẽ là animation sẽ chạy khi Dialogue: 0,0:01:15.88,0:01:17.79,Default,,0000,0000,0000,,player không làm bất cứ thứ gì Dialogue: 0,0:01:17.79,0:01:20.47,Default,,0000,0000,0000,,Chúng ta sẽ đặt cái này vào folder Animations Dialogue: 0,0:01:21.38,0:01:23.38,Default,,0000,0000,0000,,Bạn sẽ nhận thấy khi chúng ta làm điều này sẽ có hai thành phần (components) Dialogue: 0,0:01:23.38,0:01:25.91,Default,,0000,0000,0000,,được thêm vào game object, một là sprite renderer (kết xuất đồ họa), Dialogue: 0,0:01:25.91,0:01:28.58,Default,,0000,0000,0000,,nó sẽ hiển thị các frame hiện tại Dialogue: 0,0:01:28.58,0:01:33.11,Default,,0000,0000,0000,,Và một animator, nó sẽ cho phép chúng ta chạy animation. Dialogue: 0,0:01:33.11,0:01:35.11,Default,,0000,0000,0000,,Khi chúng ta frames vào Dialogue: 0,0:01:35.11,0:01:37.89,Default,,0000,0000,0000,,hai components này, nó sẽ yêu cầu chúng ta Dialogue: 0,0:01:37.89,0:01:41.58,Default,,0000,0000,0000,,lưu animation (cái mà chúng ta đã lưu) \Nvào folder Animations con Dialogue: 0,0:01:41.98,0:01:45.15,Default,,0000,0000,0000,,Nó cũng tạo ra animator controller, Dialogue: 0,0:01:45.15,0:01:47.15,Default,,0000,0000,0000,,cho phép chúng ta quản lí Dialogue: 0,0:01:47.15,0:01:48.94,Default,,0000,0000,0000,,animation đang chạy hiện tại. Dialogue: 0,0:01:48.94,0:01:52.10,Default,,0000,0000,0000,,Chúng ta sẽ di chuyển nó đến folder Animator Controllers Dialogue: 0,0:01:52.78,0:01:55.24,Default,,0000,0000,0000,,Và chúng ta sẽ thêm một số animations nữa cho player. Dialogue: 0,0:01:55.91,0:01:57.34,Default,,0000,0000,0000,,Hãy trở lại sprites. Dialogue: 0,0:01:58.11,0:02:00.49,Default,,0000,0000,0000,,Và trong trường hợp này tôi sẽ chọn Dialogue: 0,0:02:01.65,0:02:05.14,Default,,0000,0000,0000,,hai PlayerChop animation frames, Dialogue: 0,0:02:05.14,0:02:06.52,Default,,0000,0000,0000,,thả chúng vào player, Dialogue: 0,0:02:07.41,0:02:09.41,Default,,0000,0000,0000,,và chúng ta sẽ đặt tên là PlayerChop. Dialogue: 0,0:02:10.10,0:02:12.86,Default,,0000,0000,0000,,Chúng ta sẽ đặt nó vào folder Animations. Dialogue: 0,0:02:16.98,0:02:18.98,Default,,0000,0000,0000,,Bây giờ để ý sẽ thấy khi chúng ta làm như vậy sẽ không thêm Dialogue: 0,0:02:18.98,0:02:20.98,Default,,0000,0000,0000,,một animator controller khác nữa, thay vào đó Dialogue: 0,0:02:20.98,0:02:24.01,Default,,0000,0000,0000,,sẽ thêm một animation Dialogue: 0,0:02:24.01,0:02:26.25,Default,,0000,0000,0000,,vào animator controller đã tồn tại trên player. Dialogue: 0,0:02:26.25,0:02:29.12,Default,,0000,0000,0000,,Chúng ta sẽ làm lại với PlayerHit animation. Dialogue: 0,0:02:34.02,0:02:36.73,Default,,0000,0000,0000,,Tiếp theo chúng ta có thể kiểm tra để chắc chắn là chúng hoạt động. Dialogue: 0,0:02:40.29,0:02:42.63,Default,,0000,0000,0000,,Và chúng ta có thể thấy PlayerIdle đang chạy. Dialogue: 0,0:02:42.63,0:02:44.63,Default,,0000,0000,0000,,Bây giờ animation của chúng ta hơi nhanh Dialogue: 0,0:02:44.63,0:02:46.63,Default,,0000,0000,0000,,nên chúng ta sẽ mở nó Dialogue: 0,0:02:46.63,0:02:50.14,Default,,0000,0000,0000,,bằng việc click đúp vào animaor controller, Dialogue: 0,0:02:51.53,0:02:53.93,Default,,0000,0000,0000,,làm rõ trạng thái PlayerIdle Dialogue: 0,0:02:53.93,0:02:56.78,Default,,0000,0000,0000,,chúng ta chỉ cần cài đặt speed thành 0.5, Dialogue: 0,0:02:56.78,0:02:59.49,Default,,0000,0000,0000,,nó sẽ chạy với một nửa tốc độ bình thường. Dialogue: 0,0:02:59.49,0:03:01.49,Default,,0000,0000,0000,,Lưu ý rằng hai animations khác của chúng ta Dialogue: 0,0:03:01.49,0:03:03.13,Default,,0000,0000,0000,,cũng vừa mới được thêm vào states, Dialogue: 0,0:03:03.13,0:03:05.13,Default,,0000,0000,0000,,và trong loạt series sau này chúng ta sẽ Dialogue: 0,0:03:05.13,0:03:07.38,Default,,0000,0000,0000,,học cách để thay đổi Dialogue: 0,0:03:07.38,0:03:09.66,Default,,0000,0000,0000,,giữa các states bằng script. Dialogue: 0,0:03:10.14,0:03:11.43,Default,,0000,0000,0000,,Bây giờ hãy kiểm tra nó. Dialogue: 0,0:03:14.26,0:03:15.38,Default,,0000,0000,0000,,Đây. Dialogue: 0,0:03:17.42,0:03:19.42,Default,,0000,0000,0000,,Với những animations chudng ta đã tạo cho Player Dialogue: 0,0:03:19.42,0:03:21.42,Default,,0000,0000,0000,,chúng ta sẽ tiếp tục và áp dụng một tag Dialogue: 0,0:03:21.42,0:03:24.70,Default,,0000,0000,0000,,cho player tên là Player. Dialogue: 0,0:03:24.70,0:03:26.85,Default,,0000,0000,0000,,Bây giờ tag Player đã được xác định trước Dialogue: 0,0:03:26.85,0:03:29.44,Default,,0000,0000,0000,,trong tất cả projects Unity, chúng ta cũng sẽ thêm Dialogue: 0,0:03:29.44,0:03:32.33,Default,,0000,0000,0000,,vài tag nữa như là food, exit, Dialogue: 0,0:03:32.33,0:03:33.93,Default,,0000,0000,0000,,enemy và soda. Dialogue: 0,0:03:33.93,0:03:35.93,Default,,0000,0000,0000,,Vậy là đã xong thêm tag Dialogue: 0,0:03:38.50,0:03:41.65,Default,,0000,0000,0000,,và gõ vào những trường này. Dialogue: 0,0:03:42.58,0:03:45.36,Default,,0000,0000,0000,,Chúng ta sẽ cài đặt tag Player Dialogue: 0,0:03:45.36,0:03:47.49,Default,,0000,0000,0000,,và chúng ta cũng thiết lập layer (lớp). Dialogue: 0,0:03:47.49,0:03:49.31,Default,,0000,0000,0000,,Đây là layer mặc định của chúng ta, Dialogue: 0,0:03:49.31,0:03:52.64,Default,,0000,0000,0000,,và chúng ta thêm một layer gọi là Blocking Layer (layer chặn). Dialogue: 0,0:03:52.64,0:03:54.64,Default,,0000,0000,0000,,Đây là layer mà trên nó Dialogue: 0,0:03:54.64,0:03:56.64,Default,,0000,0000,0000,,tất cả các collisions (va chạm) được kiểm tra Dialogue: 0,0:03:56.64,0:03:58.64,Default,,0000,0000,0000,,và chúng ta sẽ chọn nó Dialogue: 0,0:03:58.64,0:04:00.64,Default,,0000,0000,0000,,cho player, và chúng ta thêm nó theo cách tương tự, Dialogue: 0,0:04:00.94,0:04:03.71,Default,,0000,0000,0000,,bằng việc chọn Add Layer và gõ vào đó. Dialogue: 0,0:04:03.71,0:04:06.26,Default,,0000,0000,0000,,Chúng ta sẽ tiếp tục chọn blocking layer. Dialogue: 0,0:04:06.26,0:04:08.26,Default,,0000,0000,0000,,Chúng ta sẽ thêm một layer nữa Dialogue: 0,0:04:08.26,0:04:10.26,Default,,0000,0000,0000,,liên quan đến player, Dialogue: 0,0:04:10.26,0:04:13.09,Default,,0000,0000,0000,,chúng ta sẽ thiết lập sorting layer cho sprite renderer. Dialogue: 0,0:04:13.09,0:04:15.84,Default,,0000,0000,0000,,Bây giờ chúng ta đã có một số layer xác định trước ở đây, Dialogue: 0,0:04:15.84,0:04:19.05,Default,,0000,0000,0000,,chúng ta có Floor layer, nó sẽ là background. Dialogue: 0,0:04:19.05,0:04:21.05,Default,,0000,0000,0000,,và Item layer, nó sẽ được hiển thị phía trước floor, Dialogue: 0,0:04:21.05,0:04:23.48,Default,,0000,0000,0000,,nó chính là food và soda. Dialogue: 0,0:04:23.48,0:04:26.46,Default,,0000,0000,0000,,Và sau đó là Units layer cho player và enemy. Dialogue: 0,0:04:26.46,0:04:29.36,Default,,0000,0000,0000,,Chúng ta sẽ chỉ định player cho Units layer. Dialogue: 0,0:04:29.59,0:04:32.39,Default,,0000,0000,0000,,Tiếp theo chúng ta thêm hai component Dialogue: 0,0:04:32.39,0:04:35.58,Default,,0000,0000,0000,,tới player, chúng ta sẽ thêm box collider 2D Dialogue: 0,0:04:35.58,0:04:37.58,Default,,0000,0000,0000,,và rigidbody 2D. Dialogue: 0,0:04:37.58,0:04:39.58,Default,,0000,0000,0000,,Box collider 2D sẽ cho phép chúng ta Dialogue: 0,0:04:39.58,0:04:41.58,Default,,0000,0000,0000,,kiểm tra collision (va chạm) với người chơi Dialogue: 0,0:04:41.95,0:04:43.95,Default,,0000,0000,0000,,Và rigidbody 2D sẽ cho phép chúng ta Dialogue: 0,0:04:43.95,0:04:46.59,Default,,0000,0000,0000,,di chuyển player bằng cách sử dụng phương pháp vật lý. Dialogue: 0,0:04:46.96,0:04:50.01,Default,,0000,0000,0000,,Chúng ta sẽ cài đặt rigidbody 2D là Is Kinematic Dialogue: 0,0:04:50.01,0:04:52.01,Default,,0000,0000,0000,,để cho player không bay lên Dialogue: 0,0:04:52.01,0:04:54.01,Default,,0000,0000,0000,,và nhảy lung tung, chúng ta sẽ chỉ cho anh ta di chuyển Dialogue: 0,0:04:54.01,0:04:56.83,Default,,0000,0000,0000,,trong không gian cho phép. Dialogue: 0,0:04:56.83,0:04:59.16,Default,,0000,0000,0000,,Chúng ta sẽ điều khiển nó bằng script Dialogue: 0,0:04:59.16,0:05:01.16,Default,,0000,0000,0000,,và cài đặt nó là Is Kinematic. Dialogue: 0,0:05:01.45,0:05:03.45,Default,,0000,0000,0000,,Chúng ta cũng sẽ điều chỉnh kích thước Dialogue: 0,0:05:03.45,0:05:05.45,Default,,0000,0000,0000,,của box collider 2D Dialogue: 0,0:05:05.45,0:05:07.45,Default,,0000,0000,0000,,làm nó nhỏ hơn chút để player Dialogue: 0,0:05:07.45,0:05:09.45,Default,,0000,0000,0000,,sẽ không vô tình va chạm với Dialogue: 0,0:05:09.45,0:05:11.90,Default,,0000,0000,0000,,những thứ trong không gian lân cận, Dialogue: 0,0:05:11.90,0:05:14.39,Default,,0000,0000,0000,,chỉ khi chúng đang cố gắng để di chuyển vào một không gian Dialogue: 0,0:05:14.39,0:05:16.51,Default,,0000,0000,0000,,bị chiếm bởi một collider khác. Dialogue: 0,0:05:16.51,0:05:18.51,Default,,0000,0000,0000,,Chúng ta sẽ còn thêm một vài component khác cho player nữa Dialogue: 0,0:05:18.51,0:05:21.16,Default,,0000,0000,0000,,nhưng hiện tại bây giờ như thế này là ok. Dialogue: 0,0:05:21.16,0:05:23.16,Default,,0000,0000,0000,,Chúng ta sẽ lấy nó Dialogue: 0,0:05:23.16,0:05:26.76,Default,,0000,0000,0000,,và kéo vào folder Prefabs để lưu nó lại. Dialogue: 0,0:05:27.37,0:05:29.25,Default,,0000,0000,0000,,Bây giờ chúng ta sẽ tạo prefab Dialogue: 0,0:05:29.25,0:05:31.86,Default,,0000,0000,0000,,chúng ta tạm thời có thể xóa player từ hierarchy Dialogue: 0,0:05:31.86,0:05:33.86,Default,,0000,0000,0000,,và chúng ta sẽ tạo enemy đầu tiên. Dialogue: 0,0:05:34.15,0:05:37.06,Default,,0000,0000,0000,,Chúng ta chọn Game Object - Create Empty Dialogue: 0,0:05:37.06,0:05:39.11,Default,,0000,0000,0000,,và đặt tên là Enemy1. Dialogue: 0,0:05:39.11,0:05:42.65,Default,,0000,0000,0000,,Bây giờ bắt đầu thêm animation cho Enemy1. Dialogue: 0,0:05:42.65,0:05:44.25,Default,,0000,0000,0000,,Tôi sẽ quay lại sprites Dialogue: 0,0:05:44.83,0:05:47.83,Default,,0000,0000,0000,,shift-click vào frames của animation EnemyIdle Dialogue: 0,0:05:47.83,0:05:49.16,Default,,0000,0000,0000,,và thả chúng vào đây. Dialogue: 0,0:05:50.39,0:05:52.39,Default,,0000,0000,0000,,Chúng ta sẽ gọi là Enemy1Idle. Dialogue: 0,0:05:52.66,0:05:54.55,Default,,0000,0000,0000,,Nó sẽ tự động thêm component Dialogue: 0,0:05:54.55,0:05:56.55,Default,,0000,0000,0000,,mà chúng ta cần và chúng ta sẽ thêm Dialogue: 0,0:05:56.55,0:05:58.55,Default,,0000,0000,0000,,frame khác của animation này cho nó trông tốt hơn. Dialogue: 0,0:06:02.07,0:06:04.07,Default,,0000,0000,0000,,Thêm animation Attack. Dialogue: 0,0:06:05.98,0:06:07.98,Default,,0000,0000,0000,,Chúng ta có thể nháy đúp để xem nó hoạt động Dialogue: 0,0:06:11.26,0:06:12.81,Default,,0000,0000,0000,,Và của chúng ta đây, trông khá tốt. Dialogue: 0,0:06:13.98,0:06:18.12,Default,,0000,0000,0000,,Bây giờ hãy thêm box collider và rigidbody. Dialogue: 0,0:06:24.39,0:06:26.39,Default,,0000,0000,0000,,Chúng ta cũng sẽ cài đặt rigidbody cho Dialogue: 0,0:06:26.39,0:06:28.27,Default,,0000,0000,0000,,enemy là Is Kinematic Dialogue: 0,0:06:28.27,0:06:30.54,Default,,0000,0000,0000,,và chúng ta thêm tag Enemy Dialogue: 0,0:06:30.54,0:06:33.21,Default,,0000,0000,0000,,và chỉ định blocking layer. Dialogue: 0,0:06:33.21,0:06:37.08,Default,,0000,0000,0000,,Chúng ta cũng sẽ thiết lập sorting layer của sprite renderer là Units. Dialogue: 0,0:06:41.17,0:06:43.17,Default,,0000,0000,0000,,Sau khi xong chúng ta có thể kéo thả enemy xuống Dialogue: 0,0:06:43.17,0:06:45.17,Default,,0000,0000,0000,,để tạo prefab của enemy đầu tiên. Dialogue: 0,0:06:48.94,0:06:51.07,Default,,0000,0000,0000,,Thay vì xóa cái này chúng ta sẽ Dialogue: 0,0:06:51.07,0:06:53.07,Default,,0000,0000,0000,,sửa đổi nó để tạo ra enemy thứ hai. Dialogue: 0,0:06:53.98,0:06:55.98,Default,,0000,0000,0000,,Đổi tên thành Enemy2. Dialogue: 0,0:06:59.03,0:07:00.87,Default,,0000,0000,0000,,Và chúng ta sẽ thả Dialogue: 0,0:07:00.87,0:07:02.87,Default,,0000,0000,0000,,frames Enemy2Idle vào. Dialogue: 0,0:07:12.19,0:07:14.19,Default,,0000,0000,0000,,Và frame Enemy2Attack. Dialogue: 0,0:07:20.94,0:07:23.46,Default,,0000,0000,0000,,Bây giờ khi chúng ta thả animation Dialogue: 0,0:07:23.46,0:07:26.70,Default,,0000,0000,0000,,tới enemy chúng ta đã tạo ra một animator controller mới. Dialogue: 0,0:07:26.70,0:07:30.60,Default,,0000,0000,0000,,Chúng ta sẽ di chuyển những thứ này tới folder Animator Controllers. Dialogue: 0,0:07:30.60,0:07:34.26,Default,,0000,0000,0000,,Tiếp theo chúng ta sẽ mở animator controller của Enemy1 Dialogue: 0,0:07:34.26,0:07:36.26,Default,,0000,0000,0000,,và chúng ta sẽ thấy bên trong tất cả aniamtion Dialogue: 0,0:07:36.26,0:07:39.18,Default,,0000,0000,0000,,mà chúng ta đã thêm vào như là states. Dialogue: 0,0:07:39.18,0:07:40.73,Default,,0000,0000,0000,,Bây giờ việc chúng ta cần làm là Dialogue: 0,0:07:40.73,0:07:43.42,Default,,0000,0000,0000,,xóa Enemy2 states Dialogue: 0,0:07:43.42,0:07:45.42,Default,,0000,0000,0000,,chúng ta shift-click lên từng phần Dialogue: 0,0:07:45.42,0:07:48.89,Default,,0000,0000,0000,,và sau đó right-click để xóa chúng. Dialogue: 0,0:07:49.50,0:07:51.50,Default,,0000,0000,0000,,Bây giờ nó sẽ hỏi chúng ta có muốn xóa assets đã chọn không Dialogue: 0,0:07:51.50,0:07:53.50,Default,,0000,0000,0000,,chúng ta chọn xóa. Dialogue: 0,0:07:55.09,0:07:57.41,Default,,0000,0000,0000,,Và việc chúng ta cần làm bây giờ là Dialogue: 0,0:07:57.41,0:07:59.41,Default,,0000,0000,0000,,Enemy1 và Enemy2 sẽ chia sẻ Dialogue: 0,0:07:59.41,0:08:02.80,Default,,0000,0000,0000,,cùng state giống nhau, chúng sẽ có hai state là Dialogue: 0,0:08:02.80,0:08:04.73,Default,,0000,0000,0000,,Idle và Attack. Dialogue: 0,0:08:04.73,0:08:06.73,Default,,0000,0000,0000,,Việc chúng ta cần làm bây giờ là tạo Dialogue: 0,0:08:06.73,0:08:08.73,Default,,0000,0000,0000,,một animator override controller, Dialogue: 0,0:08:09.39,0:08:12.73,Default,,0000,0000,0000,,nó sẽ cho phép chúng ta dùng cùng một state Dialogue: 0,0:08:12.73,0:08:14.63,Default,,0000,0000,0000,,và cùng một script điều khiển nó Dialogue: 0,0:08:14.63,0:08:16.63,Default,,0000,0000,0000,,nhưng chạy khác animation Dialogue: 0,0:08:16.63,0:08:18.45,Default,,0000,0000,0000,,trong mỗi state. Dialogue: 0,0:08:18.45,0:08:19.95,Default,,0000,0000,0000,,Chúng ta sẽ chọn Dialogue: 0,0:08:19.95,0:08:23.63,Default,,0000,0000,0000,,Create - Animator Override Controller. Dialogue: 0,0:08:27.37,0:08:29.37,Default,,0000,0000,0000,,Gọi nó là Enemy2 Dialogue: 0,0:08:29.74,0:08:31.74,Default,,0000,0000,0000,,Và điều đầu tiên chúng ta cần xác định Dialogue: 0,0:08:31.74,0:08:34.64,Default,,0000,0000,0000,,controller nào chúng ta cần overriding (ghi đè), Dialogue: 0,0:08:34.64,0:08:37.50,Default,,0000,0000,0000,,chúng ta chọn controller của Enemy1 và thả nó vào. Dialogue: 0,0:08:39.29,0:08:41.29,Default,,0000,0000,0000,,Và chúng ta sẽ thấy, Dialogue: 0,0:08:41.29,0:08:43.95,Default,,0000,0000,0000,,hai animation ban đầu sẽ chạy, Dialogue: 0,0:08:43.95,0:08:46.62,Default,,0000,0000,0000,,Enemy1Idle và Enemy1Attack, Dialogue: 0,0:08:46.62,0:08:49.21,Default,,0000,0000,0000,,và chúng ta sẽ ghi đè chúng với Dialogue: 0,0:08:49.81,0:08:51.81,Default,,0000,0000,0000,,Enemy2Attack Dialogue: 0,0:08:54.10,0:08:56.10,Default,,0000,0000,0000,,và Enemy2Idle. Dialogue: 0,0:08:58.55,0:09:00.55,Default,,0000,0000,0000,,Trong Enemy2 chúng ta sẽ thay đổi Dialogue: 0,0:09:00.55,0:09:02.55,Default,,0000,0000,0000,,controller của animator thành Dialogue: 0,0:09:02.55,0:09:05.59,Default,,0000,0000,0000,,dùng animator override controller. Dialogue: 0,0:09:11.25,0:09:13.25,Default,,0000,0000,0000,,Bây giờ chạy thử scene. Dialogue: 0,0:09:15.91,0:09:16.96,Default,,0000,0000,0000,,Của chúng ta đây. Dialogue: 0,0:09:18.42,0:09:22.62,Default,,0000,0000,0000,,Cuối cùng thả Enemy2 và folder prefabs Dialogue: 0,0:09:23.90,0:09:25.51,Default,,0000,0000,0000,,để tạo prefab mới. Dialogue: 0,0:09:25.51,0:09:28.35,Default,,0000,0000,0000,,Tiếp theo chúng ta xóa Enemy2 từ hierarchy Dialogue: 0,0:09:28.35,0:09:30.35,Default,,0000,0000,0000,,và lưu scene lại. Dialogue: 0,0:09:31.37,0:09:32.100,Default,,0000,0000,0000,,Chúng ta gọi nó là Main Dialogue: 0,0:09:32.100,0:09:35.93,Default,,0000,0000,0000,,và lưu vào folder Scene trống. Dialogue: 0,0:09:36.83,0:09:39.29,Default,,0000,0000,0000,,Bây giờ chúng ta đã tạo được các prefabs cơ bản Dialogue: 0,0:09:39.29,0:09:41.77,Default,,0000,0000,0000,,cho Player và Enemy Dialogue: 0,0:09:41.77,0:09:43.77,Default,,0000,0000,0000,,Bây giờ chúng ta sẽ tiếp tục tạo Dialogue: 0,0:09:43.77,0:09:46.68,Default,,0000,0000,0000,,các prefab khác mà chúng ta cần để bố trí trò chơi. Dialogue: 0,0:09:46.68,0:09:48.68,Default,,0000,0000,0000,,Trong video tiếp theo chúng ta sẽ tạo Dialogue: 0,0:09:48.68,0:09:52.75,Default,,0000,0000,0000,,floor, wall, food, soda Dialogue: 0,0:09:52.75,0:09:54.75,Default,,0000,0000,0000,,và exit prefabs.