27 lines
684 B
C#
27 lines
684 B
C#
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;
|
||
}
|
||
}
|
||
}
|