using UnityEngine;
using System.Collections;
using System.Collections.Generic;
///
/// 描述:
/// 作者:
///
public class BattleUnitBase : MonoBehaviour
{
private YLBattleUnit _mData = null;
private List _comboList;
private Dictionary> _keyInfoDic;
///
/// 所有必杀技信息
///
private Dictionary> _allUniqueDic;
///
/// buff状态是否可移动
///
public bool buffCanMove = true;
///
/// buff状态是否可攻击
///
public bool buffCanAttack = true;
public YLBattleUnit mData
{
get
{
return _mData;
}
}
///
/// 是否死亡
///
public bool isDie
{
get
{
return _mData.HP_Final <= 0;
}
}
///
/// 初始化
///
///
public void Init(YLBattleUnit data)
{
_mData = data;
}
///
/// 获取按键所对应的连击信息
/// 英雄模版ID
/// 按键类型
/// 数据
public List GetKeyComboInfo(E_KeyType kType)
{
List comboInfos = new List();
// 普通攻击
if (kType == E_KeyType.J)
{
sm_skill skill = GameConfigData.Ins.GetskillMo(int.Parse(mData.GetSKillNormal()));
KeyComboInfo kInfo = new KeyComboInfo();
kInfo.Key = E_KeyType.J;
kInfo.Skill = skill;
comboInfos.Add(kInfo);
}
// 闪避/冲刺 技能
else if (kType == E_KeyType.I)
{
sm_skill skill = GameConfigData.Ins.GetskillMo(int.Parse(mData.GetSKillJixianshabi()));
KeyComboInfo kInfo = new KeyComboInfo();
kInfo.Key = E_KeyType.I;
kInfo.Skill = skill;
comboInfos.Add(kInfo);
}
// 武器技能
else if (kType == E_KeyType.K)
{
sm_skill skill = GameConfigData.Ins.GetskillMo(int.Parse(mData.GetSkillBisha()));
KeyComboInfo kInfo = new KeyComboInfo();
kInfo.Key = E_KeyType.K;
kInfo.Skill = skill;
comboInfos.Add(kInfo);
}
// 必杀技能
else if (kType == E_KeyType.L)
{
sm_skill skill = GameConfigData.Ins.GetskillMo(int.Parse(mData.GetSkillBisha()));
KeyComboInfo kInfo = new KeyComboInfo();
kInfo.Key = E_KeyType.L;
kInfo.Skill = skill;
comboInfos.Add(kInfo);
}
return comboInfos;
}
}