当前位置:网站首页>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




边栏推荐
- Who says that PT online schema change does not lock the table, or deadlock
- Talking about the startup of Oracle Database
- Pat 1097 duplication on a linked list (25 points)
- Force buckle 1189 Maximum number of "balloons"
- 燕山大学校园网自动登录问题解决方案
- FairyGUI复选框与进度条的组合使用
- JS数组常用方法的分类、理解和运用
- Learning notes of JS variable scope and function
- Remember an experience of ECS being blown up by passwords - closing a small black house, changing passwords, and changing ports
- Stm32f1+bc20+mqtt+freertos system is connected to Alibaba cloud to transmit temperature and humidity and control LED lights
猜你喜欢

Particle system for introduction to unity3d Foundation (attribute introduction + case production of flame particle system)

Unity3d makes the registration login interface and realizes the scene jump

Problèmes avec MySQL time, fuseau horaire, remplissage automatique 0
![[golang] leetcode intermediate - fill in the next right node pointer of each node & the k-smallest element in the binary search tree](/img/6e/0802a92511ac50a652afa1678ad28c.jpg)
[golang] leetcode intermediate - fill in the next right node pointer of each node & the k-smallest element in the binary search tree

JS数组常用方法的分类、理解和运用

History object

ORA-02030: can only select from fixed tables/views

C programming exercise

JS variable types and common type conversions

Stm32f1+bc20+mqtt+freertos system is connected to Alibaba cloud to transmit temperature and humidity and control LED lights
随机推荐
The master of double non planning left the real estate company and became a programmer with an annual salary of 25W. There are too many life choices at the age of 25
idea问题记录
(五)R语言入门生物信息学——ORF和序列分析
JS数组常用方法的分类、理解和运用
(5) Introduction to R language bioinformatics -- ORF and sequence analysis
(3) Introduction to bioinformatics of R language - function, data Frame, simple DNA reading and analysis
Remember an experience of ECS being blown up by passwords - closing a small black house, changing passwords, and changing ports
基于Redis的分布式锁 以及 超详细的改进思路
Pytorch: tensor operation (I) contiguous
MySQL時間、時區、自動填充0的問題
Basic operations of databases and tables ----- modifying data tables
[Offer18]删除链表的节点
FairyGUI简单背包的制作
Working principle of genius telephone watch Z3
(the first set of course design) 1-4 message passing interface (100 points) (simulation: thread)
(课设第一套)1-5 317号子任务 (100 分)(Dijkstra:重边自环)
Stm32f1+bc20+mqtt+freertos system is connected to Alibaba cloud to transmit temperature and humidity and control LED lights
js 变量作用域和函数的学习笔记
Latex learning
JUC forkjoin and completable future