loading...
آموزش کامل نقشه کشی اتوکد مدلسازی سه بعدی به زبان فارسی
3d Rener بازدید : 53 چهارشنبه 15 آذر 1396 نظرات (0)

 آموزش یونیتی Add Difficulty Window Unity Build the difficulty window

دانلود آموزش تصویری یونیتی به زبان فارسی Unity

 بنابراین، اکنون که ما یک راه بهتر برای مدیریت هر یک از پنجره ها در بازی خود داریم، بیایید پیش برویم و پنجره نهایی را برای این دوره ایجاد کنیم. در بوم ما، ما راست کلیک کرده و پانل جدیدی ایجاد می کنیم. بیایید این پنل DifficultyWindow را بزنیم. ما قصد داریم با دکمه جابجایی کار کنیم و یک راه آسان برای تغییر بین آسان، متوسط ​​و سخت هنگامی که شما شروع به شروع بازی خود را ایجاد کنید. اکنون ما پنل ما داریم، رنگ آلفا را به 100٪ تغییر دهیم و تصویر پس زمینه را به چهار پالت ما تغییر دهیم. بعد، بیایید یک شیء بازی خالی ایجاد کنیم و آن را DifficultyGroup نامیم. ما یک تصویر جدید اضافه می کنیم و تصویر را به مرز پنجره می بندیم. همچنین، بگذارید پیش برویم و موقعیت X و Y را به صفر برسانیم. در حال حاضر، ما قصد داریم یک طرح عمودی در داخل DifficultyGroup ایجاد کنیم. در طرح عمودی ما، بطری را تغییر می دهیم. ما به سمت چپ به 10، به سمت راست به 10، به بالا به پنج و به پایین به هشت. ما همچنین یک فاصله از پنج را کنار گذاشتیم و این مرکز بالادستی کودکان را ایجاد خواهیم کرد. ما همچنین جعبه های جعبه را برای گسترش نیروی کودک و افزایش ارتفاع انتخاب می کنیم. بعد، اجازه بدهید یک Content Size Fitter اضافه کنیم. ما Fit Horizontal به Preferred Size و Fit Fit به Preferred Size را نیز تغییر خواهیم داد. حالا، اجازه دهید به پوشه Prefab ما برویم و یک عنوان را به گروه سخت افزاری بکشیم. ما متن را برای گفتن انتخاب می کنیم. یک سختی را انتخاب کنید. بگذارید عنصر طرح را به عنوان عنوان اضافه کنیم و ارتفاع ترجیحی را در 18 قفل کنیم. بعد، ما می خواهیم هر دکمه جابجایی را اضافه کنیم. بیایید یک شی جدید بازی خالص اضافه کنیم و ما قصد داریم این ToggleGroup را تماس بگیریم.

On the ToggleGroup, we're going to create a Horizontal Layout. And we'll also want to add a layout element to define the size of our toggle group. Let's select the Preferred Width and set it to 100 and the Preferred Height to 20. Next, let's add a ToggleGroup component. This will allow us to manage each of the toggle buttons inside of the group. And, finally, let's add each of the buttons. Drag the toggle from our Prefab folder over to the ToggleGroup. If you still have the Visualize button enabled simply disable it so that we can see each of the buttons as we lay them out. We'll copy this button and paste it two more times. And, starting with the first button, let's rename this to Easy and we'll change the label inside of it to say Easy as well. On the second one, we'll change this to Medium and change the label. And, finally, for the third, we'll make it Hard. Next, let's select each of the buttons and uncheck Is On and drag a reference of the ToggleGroup to the Group Field. Now, if we run our game, you'll see we'll be able to go through and click on each of our options and see the arrow appear based on where we select. Now we have the basic foundation of our Difficulty Selector. We'll still need to wire it all up.

تعداد صفحات : 136

اطلاعات کاربری