当前位置:网站首页>08_ UE4 advanced_ Start end pause menu UI
08_ UE4 advanced_ Start end pause menu UI
2022-07-26 20:55:00 【Ruthless reading machine】
Attach numbers to the progress bar , To display the value
Drag a text block and put it in the corresponding position , And change the anchor

Create a binding for text ( I have created this , And renamed )

Binding function content

compile , effect

Similarly, the current hp value

Similarly, display mp value

One of them needs to be repaired bug, That is, we should always check whether the blood volume is reduced to a negative value .
stay damage Incident , modify ,recent-damage>0,true Is to assign the result to recent,false Will be recent Directly set to 0.

New demand : When the character's blood becomes 0, We want the game to pause or end .
So use 0 Set up hprecent when , We want to pause the game .

This pause effect is too rigid .
We need to let players lose control first , Freeze the screen in a few seconds .
When hp by 0, The speed and speed of the character are established 0,0.2s after , Game pause ( In the later stage, the animation of falling to the ground will be added )

Increase demand : Add one after the game pauses ui, Show gameover
establish ui Control blueprint

Pull in a border, Adjust the position and anchor
Set up border The background of


Put a text , Write gameover, Adjust the font size

Put in a button

Drag a text into the button , Content is to exit the game
Create functions for buttons
Add button click event



Start after the game pauses ui

Although there is this ui, But we didn't get control of the mouse . Now take control .
Test success .
Now realize the game pause ui

Continue to add events with game keys

After clicking , Eliminate all ui Control , Then show hp and mp Of ui, And then continue to play , Game control changes from mouse to game character .

Press p key , Generate pause game ui, And get the control of the mouse

Test success .
------------------------------------------------------------------------------------------------------------------------------
The start menu of the game
programme 1: Open the game , Show the start game menu , Then click start game to enter the game .
shortcoming : When we click exe, You need to load the whole main map immediately , The bigger the map , The slower the loading speed . If the map is big , The screen will be black for a long time , To see our start menu .
programme 2: First load a small level , Then click start game , Enter the main level .
First, create a new game level .

Rename it to start_menu, This is a completely blank map .

Create start menu ui The blueprint

The click event of the start game button is

Double click in start_menu checkpoint , Then open the level blueprint , Editing .

When the level starts , Start menu generation .

Run this level , Find out hpbar Of ui It's already running
This is because there is nothing at this level , But by default, little white people are loaded .
The little white man's game start event was created hpbar.

therefore , We will create hpbar Put the code of into the blueprint of the main level .

Test success .
边栏推荐
- Using union to sort MySQL
- Buu brush inscription 3
- Gartner released the latest market guide for Chinese AI start-ups, and Hongji cyclone was once again rated as a representative enterprise
- Interceptors
- Buu brush inscription 1
- 剑指offer46把数字翻译成字符串
- 传惠普/戴尔/微软/亚马逊考虑将部分硬件生产线转到大陆以外
- Houdini 求中点,点连成线
- 易基因|宏病毒组测序技术介绍
- 实验5 OSPF综合实验
猜你喜欢

Bean注入和生命周期

Basic configuration and aggregation of BGP
![Installation and configuration of [basic services] [database] Clickhouse](/img/fe/5c24e4c3dc17a6a96985e4fe97024e.png)
Installation and configuration of [basic services] [database] Clickhouse

Houdini notes 2

Easy gene | introduction to macrovirus sequencing technology

Centos7 about Oracle RAC 11gr2 deployment disk partition

Kotlin - coroutinecontext

每日练习------有一组学员的成绩,将它们按降序排列,要增加一个学员的成绩,将它插入成绩序列,并保持降序

PointPillars: Fast Encoders for Object Detection from Point Clouds 阅读笔记

Shell comprehensive application cases, archive files
随机推荐
20220726
Correct the classpath of your application so that it contains compatible versions of the classes com
CentOS7关于Oracle RAC 11GR2部署磁盘分区问题
81.(cesium之家)cesium修改灰色背景(默认蓝色)
韩国计划每年砸1万亿韩元,研发半导体材料及设备
Keepalived high availability introduction and configuration details
Shell function, system function, basename [string / pathname] [suffix] can be understood as taking the file name in the path, dirname file absolute path, and user-defined function
营销与销售文件管理以及工作流程解决方案
LeetCode链表问题——24.两两交换链表中的结点(一题一文学会链表)
Sword finger offer46 translates numbers into strings
【【实验分享】CCIE—BGP路由黑洞实验】
QT driving school subject examination system -- from implementation to release
The lawyer team of the US Department of justice asked the judge to refuse to accept Huawei's lawsuit
St table, weighted and search set
让华为吃了败诉的CNEX Labs到底有何来头?
7.25模拟赛总结
What is the origin of CNEX labs, which let Huawei lose the lawsuit?
twenty million two hundred and twenty thousand seven hundred and twenty-six
LCP 11. Statistics of expected number
Can the training software test be employed