48 lines
1.3 KiB
C#
48 lines
1.3 KiB
C#
|
|
using UnityEngine;
|
|||
|
|
using UnityEngine.UI;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD>UI<55><49><EFBFBD><EFBFBD>_<EFBFBD><5F><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public partial class SkillUIObj
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
private Material material;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
private GameObject redDotObj;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// ɨ<><C9A8>
|
|||
|
|
/// </summary>
|
|||
|
|
private void SweepAway()
|
|||
|
|
{
|
|||
|
|
if (!UserDataManager.Instance.userData.guidance.isTryOutTap&&tryOutBtn.gameObject.activeInHierarchy)
|
|||
|
|
{
|
|||
|
|
material = Instantiate(YooAssetManager.Instance.LoadAssetSync<Material>(PackagesName.GameData, "SweepAway"));
|
|||
|
|
tryOutBtn.GetComponent<Image>().material = material;
|
|||
|
|
redDotObj = Instantiate(YooAssetManager.Instance.LoadAssetSync<GameObject>(PackagesName.GameData, "RedDot"));
|
|||
|
|
redDotObj.transform.SetParent(this.transform);
|
|||
|
|
redDotObj.transform.localScale = Vector3.one;
|
|||
|
|
redDotObj.transform.localPosition = new Vector2(760, 170);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// ɾ<><C9BE>ɨ<EFBFBD><C9A8>
|
|||
|
|
/// </summary>
|
|||
|
|
public void DesSweepAway()
|
|||
|
|
{
|
|||
|
|
if (material != null && redDotObj != null)
|
|||
|
|
{
|
|||
|
|
Destroy(material);
|
|||
|
|
tryOutBtn.GetComponent<Image>().material = null;
|
|||
|
|
Destroy(redDotObj.gameObject);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|