35 lines
890 B
C#
35 lines
890 B
C#
|
|
using System.Collections;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using UnityEngine;
|
||
|
|
using UnityEngine.UI;
|
||
|
|
|
||
|
|
public class OnInventoryEnable : MonoBehaviour
|
||
|
|
{
|
||
|
|
[SerializeField] private Image fadedBackground;
|
||
|
|
[SerializeField] private GameObject HeadingContainer;
|
||
|
|
private void OnEnable()
|
||
|
|
{
|
||
|
|
if (gameObject.scene.isLoaded)
|
||
|
|
{
|
||
|
|
Color fadedColor = fadedBackground.color;
|
||
|
|
|
||
|
|
if (UIManager.Instance.BankVaultCanvas.activeInHierarchy)
|
||
|
|
{
|
||
|
|
fadedColor.a = 0.0f;
|
||
|
|
HeadingContainer.SetActive(false);
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
fadedColor.a = 0.9568627f;
|
||
|
|
HeadingContainer.SetActive(true);
|
||
|
|
}
|
||
|
|
|
||
|
|
fadedBackground.color = fadedColor;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
private void OnDisable()
|
||
|
|
{
|
||
|
|
UIManager.Instance.WeaponStatsManager?.HideCall();
|
||
|
|
}
|
||
|
|
}
|