NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/GameWrapper/Premium/PremiumPVPHandle.cs

27 lines
684 B
C#
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PremiumPVPHandle : PremiumHandle
{
protected override void OnPremiumStatusChanged(PremiumStatusChangedEvent eventData)
{
if (eventData.IsActivated)
{
if (eventData.PvpProtectionCount == 0)
{
gameObject.transform.localScale = Vector3.one;
}
else
{
//发生了PVP保护隐藏图标
gameObject.transform.localScale = Vector3.zero;
}
}
else
{
gameObject.transform.localScale = Vector3.zero;
}
}
}