zxl
/
CTT
forked from Cal/CTT
1
0
Fork 0
CTT/Unity/Assets/HotfixView/Event/UpdateUnitAngleEvent.cs

23 lines
534 B
C#

using ET.EventType;
using ET;
using System;
using System.Collections.Generic;
namespace ET
{
public class UpdateUnitAngleEvent : AEvent_Sync<UpdateUnitAngle>
{
public override void Run(UpdateUnitAngle args)
{
Unit unit = args.unit;
UnitView unitView = unit.GetComponent<UnitView>();
if (unitView == null)
{
Log.Error($"uniView == null");
return;
}
unitView.IsFlip = args.yAngle==180;
}
}
}