wirm/Game/Assets/ProgressHelper.cs

38 lines
752 B
C#
Raw Normal View History

2025-01-27 16:33:12 +08:00
// ******------------------------------------------------------******
// ProgressHelper.cs
//
// Author:
// K.Sinan Acar <ksa@puzzledwizard.com>
//
// Copyright (c) 2019 PuzzledWizard
//
// ******------------------------------------------------------******
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
namespace PW
{
public class ProgressHelper : MonoBehaviour
{
public Image m_Image;
public void UpdateProcessUI(float curAmount,float totalProcess)
{
if (m_Image != null)
m_Image.fillAmount = curAmount / totalProcess;
}
public void ToggleHelper(bool result)
{
gameObject.SetActive(result);
m_Image.fillAmount = 0;
}
}
}