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

37 lines
1.1 KiB
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 SetHudCharacterEvent : AEvent_Sync<SetHudCharacter>
{
public override void Run(SetHudCharacter args)
{
2021-04-11 19:50:39 +08:00
Unit unit = args.unit;
HudCharacter hud = unit.GetComponent<HudCharacter>();
2021-04-08 20:09:59 +08:00
hud.Init(args, args.progressTitleType);
}
}
public class SetHudCharacter_ChangeHpEvent : AEvent_Sync<SetHudCharacter_ChangeHp>
{
public override void Run(SetHudCharacter_ChangeHp args)
{
2021-04-11 19:50:39 +08:00
Unit unit = args.unit;
NumericComponent num = unit.GetComponent<NumericComponent>();
HudCharacter hud = unit.GetComponent<HudCharacter>();
2021-04-08 20:09:59 +08:00
hud.RefreshHp(num);
}
}
public class SetHudCharacter_ChangeLevelEvent : AEvent_Sync<SetHudCharacter_ChangeLevel>
{
public override void Run(SetHudCharacter_ChangeLevel args)
{
2021-04-11 19:50:39 +08:00
Unit unit = args.unit;
HudCharacter hud = unit.GetComponent<HudCharacter>();
2021-04-08 20:09:59 +08:00
hud.ChangeToLevel(unit);
}
}
}