23 lines
528 B
C#
23 lines
528 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)
|
|||
|
{
|
|||
|
var unit = args.unit;
|
|||
|
var unitView = unit.GetComponent<UnitView>();
|
|||
|
if (unitView == null)
|
|||
|
{
|
|||
|
Log.Error($"uniView == null");
|
|||
|
return;
|
|||
|
}
|
|||
|
unitView.IsFlip = args.yAngle==180;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|