当前位置:网站首页>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
边栏推荐
- [golang] leetcode intermediate - fill in the next right node pointer of each node & the k-smallest element in the binary search tree
- SVN更新后不出现红色感叹号
- Meanings and differences of PV, UV, IP, VV, CV
- Basic operations of databases and tables ----- classification of data
- 2022.2.12 resumption
- Design and implementation of general interface open platform - (39) simple and crude implementation of API services
- Custom view puzzle getcolor r.color The color obtained by colorprimary is incorrect
- [leetcode622]设计循环队列
- Database course design: college educational administration management system (including code)
- JS 函数提升和var变量的声明提升
猜你喜欢
ES6 grammar summary -- Part I (basic)
(三)R语言的生物信息学入门——Function, data.frame, 简单DNA读取与分析
Compilation principle: preprocessing of source program and design and implementation of lexical analysis program (including code)
JS Title: input array, exchange the largest with the first element, exchange the smallest with the last element, and output array.
Unity3d makes the registration login interface and realizes the scene jump
基于Redis的分布式锁 以及 超详细的改进思路
Fairygui joystick
FairyGUI簡單背包的制作
idea问题记录
Symbolic representation of functions in deep learning papers
随机推荐
Meanings and differences of PV, UV, IP, VV, CV
Whistle+switchyomega configure web proxy
Unity scene jump and exit
Working principle of genius telephone watch Z3
JS数组常用方法的分类、理解和运用
[Offer29] 排序的循环链表
[offer78] merge multiple ordered linked lists
Intermediate use tutorial of postman [environment variables, test scripts, assertions, interface documents, etc.]
[Offer18]删除链表的节点
FairyGUI摇杆
(五)R语言入门生物信息学——ORF和序列分析
JS variable types and common type conversions
Acwing-116 pilot brother
Unity3d, Alibaba cloud server, platform configuration
NRF24L01故障排查
(core focus of software engineering review) Chapter V detailed design exercises
Walk into WPF's drawing Bing Dwen Dwen
SSD technical features
JS 函数提升和var变量的声明提升
Database course design: college educational administration management system (including code)