23 lines
534 B
C#
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;
|
|
}
|
|
}
|
|
}
|