当前位置:网站首页>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
边栏推荐
- About using @controller in gateway
- Database table splitting strategy
- FairyGUI簡單背包的制作
- Fairygui joystick
- It has been solved by personal practice: MySQL row size too large (> 8126) Changing some columns to TEXT or BLOB or using ROW_ FORMAT
- How to add music playback function to Arduino project
- Unity3D基础入门之粒子系统(属性介绍+火焰粒子系统案例制作)
- Problèmes avec MySQL time, fuseau horaire, remplissage automatique 0
- js 变量作用域和函数的学习笔记
- SSD technical features
猜你喜欢
ES6 grammar summary -- Part 2 (advanced part es6~es11)
Compilation principle: preprocessing of source program and design and implementation of lexical analysis program (including code)
CUDA C programming authoritative guide Grossman Chapter 4 global memory
FairyGUI摇杆
(4) Data visualization of R language -- matrix chart, histogram, pie chart, scatter chart, linear regression and strip chart
Working principle of genius telephone watch Z3
MySQL takes up too much memory solution
MySQL占用内存过大解决方案
Redis based distributed ID generator
Learning notes of JS variable scope and function
随机推荐
(core focus of software engineering review) Chapter V detailed design exercises
Postman 中级使用教程【环境变量、测试脚本、断言、接口文档等】
Problèmes avec MySQL time, fuseau horaire, remplissage automatique 0
NRF24L01故障排查
First use of dosbox
如何给Arduino项目添加音乐播放功能
What is the maximum length of MySQL varchar field
Game 280 weekly
Unity3D,阿里云服务器,平台配置
Particle system for introduction to unity3d Foundation (attribute introduction + case production of flame particle system)
JS数组常用方法的分类、理解和运用
MySQL performance tuning - dirty page refresh
ESP8266连接onenet(旧版MQTT方式)
编译原理:源程序的预处理及词法分析程序的设计与实现(含代码)
Basic operations of databases and tables ----- classification of data
In 2020, the average salary of IT industry exceeded 170000, ranking first
Guided package method in idea
About using @controller in gateway
Gateway fails to route according to the service name, and reports an error service unavailable, status=503
2021.11.10 compilation examination