CTT/Unity/Assets/HotfixView/Event/UpdateUnitAngleEvent.cs

23 lines
534 B
C#
Raw Normal View History

2021-04-08 20:09:59 +08:00
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)
{
2021-04-11 19:50:39 +08:00
Unit unit = args.unit;
UnitView unitView = unit.GetComponent<UnitView>();
2021-04-08 20:09:59 +08:00
if (unitView == null)
{
Log.Error($"uniView == null");
return;
}
unitView.IsFlip = args.yAngle==180;
}
}
}