wirm/Game/Assets/ProgressHelper.cs
2025-01-27 16:41:03 +08:00

37 lines
752 B
C#

// ******------------------------------------------------------******
// 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;
}
}
}