当前位置:网站首页>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
边栏推荐
- (课设第一套)1-4 消息传递接口 (100 分)(模拟:线程)
- C programming exercise
- Gateway fails to route according to the service name, and reports an error service unavailable, status=503
- Teach you to release a DeNO module hand in hand
- Redis 缓存更新策略,缓存穿透、雪崩、击穿问题
- Intermediate use tutorial of postman [environment variables, test scripts, assertions, interface documents, etc.]
- Page performance optimization of video scene
- Single chip Bluetooth wireless burning
- Meanings and differences of PV, UV, IP, VV, CV
- (四)R语言的数据可视化——矩阵图、柱状图、饼图、散点图与线性回归、带状图
猜你喜欢
Intermediate use tutorial of postman [environment variables, test scripts, assertions, interface documents, etc.]
Basic operations of databases and tables ----- classification of data
單片機藍牙無線燒錄
Basic operations of databases and tables ----- view data tables
Expected value (EV)
ES6 grammar summary -- Part I (basic)
Unity3d, Alibaba cloud server, platform configuration
Conditional probability
Classification, understanding and application of common methods of JS array
Theoretical derivation of support vector machine
随机推荐
Knowledge summary of request
MySQL performance tuning - dirty page refresh
1041 be unique (20 points (s)) (hash: find the first number that occurs once)
Gateway fails to route according to the service name, and reports an error service unavailable, status=503
Fairygui joystick
FairyGUI简单背包的制作
MySQL replacement field part content
[Offer18]删除链表的节点
Unity3d camera, the keyboard controls the front and rear left and right up and down movement, and the mouse controls the rotation, zoom in and out
MySQL时间、时区、自动填充0的问题
(1) Introduction Guide to R language - the first step of data analysis
[Clickhouse kernel principle graphic explanation] about the collaborative work of partitioning, indexing, marking and compressed data
Mysqldump error1066 error solution
Working principle of genius telephone watch Z3
JUC forkjoin and completable future
Classification, understanding and application of common methods of JS array
(一)R语言入门指南——数据分析的第一步
(4) Data visualization of R language -- matrix chart, histogram, pie chart, scatter chart, linear regression and strip chart
js题目:输入数组,最大的与第一个元素交换,最小的与最后一个元素交换,输出数组。
JS variable types and common type conversions