You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
776 B
22 lines
776 B
3 years ago
|
using System.Collections.Generic;
|
||
|
using ET.EventType;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace ET
|
||
|
{
|
||
|
[FriendClass(typeof(Unit))]
|
||
|
public class M2C_NotifyNightEventHandler: AMHandler<M2C_NotifyNightEvent>
|
||
|
{
|
||
|
protected override void Run(Session session, M2C_NotifyNightEvent message)
|
||
|
{
|
||
|
if (message.EventSeed > 0)
|
||
|
{
|
||
|
Unit unit = UnitComponent.unit;
|
||
|
unit.EventSeed = message.EventSeed;
|
||
|
unit.EventNames = message.EventNames;
|
||
|
List<NightEvent> nightEvents = UnitOperate.NightEvent(unit, message.NightTime, message.Time);
|
||
|
Game.EventSystem.Publish(new EventType.ShowNightEvent() { Unit = unit, Events = nightEvents, ShowAni = true});
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|