using DG.Tweening;
|
using System.Collections;
|
using System.Collections.Generic;
|
using UnityEngine;
|
using UnityEngine.UI;
|
|
/// <summary>
|
/// 子弹充能对应的数据结构.
|
/// </summary>
|
public class BulletUICtl : MonoBehaviour
|
{
|
public Image bulletScaleMask;
|
public float fAdjValue;
|
|
// Start is called before the first frame update
|
void Start()
|
{
|
|
}
|
|
/// <summary>
|
/// 更新子弹界面对应的缩放信息
|
/// </summary>
|
/// <param name="curBNum"></param>
|
/// <param name="totalBNum"></param>
|
public void updateBulletUI( int curBNum,int totalBNum)
|
{
|
if (bulletScaleMask == null) return;
|
float scaleY = 1.0f - curBNum / (float)totalBNum - fAdjValue;
|
bulletScaleMask.rectTransform.DOScaleY( scaleY, 0.1f);
|
}
|
|
// Update is called once per frame
|
void Update()
|
{
|
|
}
|
}
|