当前位置:网站首页>Combination of fairygui check box and progress bar
Combination of fairygui check box and progress bar
2022-07-06 12:42:00 【SQ Liu】
FairyGUI Combination of check box and progress bar
One 、 preparation
1、 New package ProgressBar
You can create a new package based on the previous case .
2、 New component
3、 Import material
Click here to download the material
Two 、 Progress bar
1、 New progress bar
2、 Fine tune the progress bar
3、 Progress bar running animation
In order to make the progress bar less monotonous , You can add an animation to it . When making the progress bar stretch , The squirrel moves to the right as the progress bar increases . That is, there is such an effect of running with , It looks more vivid .
Set correlation
3、 ... and 、 A drop-down box
1、 Create a new drop-down box
2、 Set the drop-down box
3、 The drop-down box completes the effect
Four 、 Packaging releases
5、 ... and 、Unity It shows that
6、 ... and 、 coded
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using FairyGUI;
using System;
public class ProgressBar : MonoBehaviour
{
private GComponent mainUI;
private GProgressBar progressBar;
private GComboBox comboBox;
void Start()
{
mainUI = GetComponent<UIPanel>().ui;
progressBar = mainUI.GetChild("n0").asProgress;
progressBar.TweenValue(100, 5); //100 Is the progress to be loaded ,5 It takes time
comboBox = mainUI.GetChild("n4").asComboBox;
comboBox.onChanged.Add(SetCompleteTime);
}
private void SetCompleteTime()
{
progressBar.value = 0; // Each reload sets its progress to 0
progressBar.TweenValue(100, Convert.ToInt32(comboBox.value));
}
}
7、 ... and 、 Final effect
边栏推荐
- 燕山大学校园网自动登录问题解决方案
- [Offer29] 排序的循环链表
- HCIP Day 12
- (三)R语言的生物信息学入门——Function, data.frame, 简单DNA读取与分析
- ORA-02030: can only select from fixed tables/views
- Mysqldump error1066 error solution
- 单片机蓝牙无线烧录
- History object
- (the first set of course design) sub task 1-5 317 (100 points) (dijkstra: heavy edge self loop)
- 记一次云服务器被密码爆破的经历——关小黑屋、改密码、改端口
猜你喜欢
JS数组常用方法的分类、理解和运用
Intermediate use tutorial of postman [environment variables, test scripts, assertions, interface documents, etc.]
JS regular expression basic knowledge learning
Unity3D制作注册登录界面,并实现场景跳转
NRF24L01故障排查
Basic operations of databases and tables ----- view data tables
Basic operations of databases and tables ----- creating data tables
Unity3D,阿里云服务器,平台配置
Working principle of genius telephone watch Z3
idea中好用的快捷键
随机推荐
Redis 缓存更新策略,缓存穿透、雪崩、击穿问题
[Red Treasure Book Notes simplified version] Chapter 12 BOM
HCIP Day 12
Solution to the problem of automatic login in Yanshan University Campus Network
js题目:输入数组,最大的与第一个元素交换,最小的与最后一个元素交换,输出数组。
@The difference between Autowired and @resource
MySQL takes up too much memory solution
Fairygui joystick
InnoDB dirty page refresh mechanism checkpoint in MySQL
JS變量類型以及常用類型轉換
MySQL time, time zone, auto fill 0
About using @controller in gateway
Problèmes avec MySQL time, fuseau horaire, remplissage automatique 0
ES6 grammar summary -- Part I (basic)
ORA-02030: can only select from fixed tables/views
Gateway 根据服务名路由失败,报错 Service Unavailable, status=503
Single chip Bluetooth wireless burning
JS regular expression basic knowledge learning
Idea problem record
Types de variables JS et transformations de type communes