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

19 lines
467 B
C#

using ET.EventType;
using ET;
using System;
using System.Collections.Generic;
namespace ET
{
public class SetGameObjectActiveEvent : AEvent<SetGameObjectActive>
{
public override async ETTask Run(SetGameObjectActive args)
{
Unit unit = args.unit;
UnitView unitView = unit.GetComponent<UnitView>();
unitView.gameObject.SetActive(args.isVisible);
await ETTask.CompletedTask;
}
}
}