Exemple #1
0
 public FighterData(FighterList.Param param)
 {
     name      = param.Name;
     key       = param.Key;
     maxLife   = param.Life;
     life      = param.Life;
     attack    = param.Attack;
     skillList = BattleManager.GetCharaSkill(param.ID);
 }
Exemple #2
0
        void Init(int ID)
        {
            Debug.Log("FighterList::Init[" + ID + "]");
            FighterList.Param param = Excel <FighterList> .Item.list.Find(o => o.ID == ID);

            name      = param.Name;
            key       = param.Key;
            maxLife   = param.Life;
            life      = param.Life;
            attack    = param.Attack;
            skillList = BattleManager.GetCharaSkill(param.ID);
            Debug.Log(this);
        }
Exemple #3
0
    static public int[] GetCharaSkill(int fighterID)
    {
        FighterList.Param fighter = Excel <FighterList> .Item.list.Find(o => o.ID == fighterID);

        if (fighter == null)
        {
            return(null);
        }
        SkillList.Param[] skillParamList = new SkillList.Param[] {
            Excel <SkillList> .Item.list.Find(o => o.Key == fighter.Skill1),
            Excel <SkillList> .Item.list.Find(o => o.Key == fighter.Skill2),
            Excel <SkillList> .Item.list.Find(o => o.Key == fighter.Skill3),
            Excel <SkillList> .Item.list.Find(o => o.Key == fighter.Skill4)
        };
        int[] ret = new int[] {
            (skillParamList[0] != null)?skillParamList[0].ID: 0,
            (skillParamList[1] != null)?skillParamList[1].ID: 0,
            (skillParamList[2] != null)?skillParamList[2].ID: 0,
            (skillParamList[3] != null)?skillParamList[3].ID: 0,
        };
        return(ret);
    }