55 lines
1.9 KiB
C#
55 lines
1.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace ET
|
|
{
|
|
|
|
public class BuffBrocastComponentAwakeSystem : AwakeSystem<BuffBrocastComponent>
|
|
{
|
|
public override void Awake(BuffBrocastComponent self)
|
|
{
|
|
BuffBrocastComponent.Instance = self;
|
|
}
|
|
}
|
|
//public class BuffBrocastComponentUpdateSsytem : UpdateSystem<BuffBrocastComponent>
|
|
//{
|
|
// public override void Update(BuffBrocastComponent self)
|
|
// {
|
|
// var now = TimeHelper.ClientNow();
|
|
// while(self.skillRetQue.TryPeek(out var value))
|
|
// {
|
|
// if (now < value.Item1) break;
|
|
// var skilRet = self.skillRetQue.Dequeue().Item2;
|
|
// };
|
|
// while (self.touchBuffRetQue.TryPeek(out var value))
|
|
// {
|
|
// if (now < value.Item1) break;
|
|
// var skilRet = self.touchBuffRetQue.Dequeue().Item2;
|
|
// Game.EventSystem.Publish(skilRet).Coroutine();
|
|
// };
|
|
// while (self.buffRetQue.TryPeek(out var value))
|
|
// {
|
|
// if (now < value.Item1) break;
|
|
// var skilRet = self.buffRetQue.Dequeue().Item2;
|
|
// Game.EventSystem.Publish(skilRet).Coroutine();
|
|
// };
|
|
// }
|
|
//}
|
|
|
|
public static class BuffBrocastComponentSystem
|
|
{
|
|
public static void Add(this BuffBrocastComponent self, long time, EventType.BattleSkillRet skillResultValue)
|
|
{
|
|
Game.EventSystem.Publish(skillResultValue).Coroutine();
|
|
}
|
|
public static void AddTouchState(this BuffBrocastComponent self, long time, EventType.TouchBuffStateRet buffState)
|
|
{
|
|
Game.EventSystem.Publish(buffState).Coroutine();
|
|
}
|
|
public static void AddChangeState(this BuffBrocastComponent self, long time, EventType.BuffStateRet buffState)
|
|
{
|
|
Game.EventSystem.Publish(buffState).Coroutine();
|
|
}
|
|
}
|
|
}
|