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.
 
 
 
 
 
 

35 lines
965 B

using System.Collections.Generic;
using CoreGame;
using Entitas;
namespace CoreGame.Render
{
public class RiseHurtSystem : ReactiveSystem<CombatEntity>
{
public RiseHurtSystem(Contexts contexts) : base(contexts.combat)
{
}
protected override ICollector<CombatEntity> GetTrigger(IContext<CombatEntity> context)
{
return context.CreateCollector(CombatMatcher.JumpText);
}
protected override bool Filter(CombatEntity entity)
{
return true;
}
protected override void Execute(List<CombatEntity> entities)
{
var jumpText = entities[0].jumpText;
while (jumpText != null && jumpText.hurtDatas.Count > 0)
{
var hurtData = jumpText.hurtDatas.Dequeue();
jumpText.ShowChangeHpJumpText(hurtData);
SptPool<HurtData>.Free(ref hurtData);
}
}
}
}