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.
48 lines
1.7 KiB
48 lines
1.7 KiB
3 years ago
|
using System.Collections.Generic;
|
||
|
using ET.EventType;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace ET
|
||
|
{
|
||
|
public enum BattleActionSegemntType
|
||
|
{
|
||
|
MoveToTarget, // 移动到目标位置
|
||
|
Attack, // 攻击
|
||
|
MoveBack, // 回到自己的位置
|
||
|
Intervene, // 援护
|
||
|
}
|
||
|
|
||
|
public class HurtInfoView
|
||
|
{
|
||
|
public BattleUnitViewComponent Target;
|
||
|
public int DamageValue; // 伤害值
|
||
|
public bool IsCritical; // 是否暴击
|
||
|
}
|
||
|
|
||
|
public class BattleActionSegmentInfo
|
||
|
{
|
||
|
public BattleActionSegemntType Type;
|
||
|
public int CastPosition; // 施法位置
|
||
|
public BattleUnitViewComponent Source; // 施法者
|
||
|
public BattleUnitViewComponent Target; // 目标
|
||
|
public List<HurtInfoView> HurtInfoViews = new List<HurtInfoView>(); // 受伤目标,和被攻击目标可能不同,隔山打牛
|
||
|
public BattleUnitViewComponent Intervener; // 援护者
|
||
|
public int SonSkillId; // 子技能Id
|
||
|
public AtkInfo AtkInfo;
|
||
|
}
|
||
|
|
||
|
[ComponentOf(typeof(Scene))]
|
||
|
public class BattleManagerComponent: Entity, IAwake, IUpdate, IDestroy
|
||
|
{
|
||
|
public Battle BattleInfo;
|
||
|
|
||
|
public List<TurnInfo> TurnInfos = new List<TurnInfo>();
|
||
|
public Queue<BattleActionSegmentInfo> BASegmentInfos = new Queue<BattleActionSegmentInfo>();
|
||
|
public float CurActionPassedTime = 0;
|
||
|
public BattleActionSegment CurBASegment;
|
||
|
public bool OneTurnStart = false;
|
||
|
|
||
|
public List<long> DieBattleUnitIds = new List<long>();
|
||
|
public Dictionary<long, BattleUnitDrop> DropInfoDict = new Dictionary<long, BattleUnitDrop>();
|
||
|
}
|
||
|
}
|