优化进度条动画展示
发布时间
阅读量:
阅读量
引入System.Collections;
引入System.Collections.Generic;
引入Unity framework;
引入Unity.UI;
引入DG.Tweening;
引入System;
public class LvUpAnim : MonoBehaviour
{
public Image fill;
[SerializeField]
int curLv, upLv, maxLv;//当前等级,升级后等级,最大等级
[SerializeField]
float lastValue;//升级后进度条的值
float playTime = 0.25f;//进度条动画播放时间/次
// This block initializes the game state
void Start() {
// Set base values and trigger level checks
//fill.fillAmount = lastValue;
if (upLv - curLv > 6) {
calculate the playback duration as a function of the level gap.
// Ensure smo
全部评论 (0)
还没有任何评论哟~
