Ejemplo n.º 1
0
        public void SetAdditionFormationAttrActive(int formationId, bool active)
        {
            FormationInfo formationInfo = GetFormationInfo(formationId);

            if (formationInfo != null)
            {
                formationInfo.isActiveAdditionAttr = active;
            }
        }
Ejemplo n.º 2
0
        //阵型战力加成
        public float FormationPower(int formationId)
        {
            if (!FormationInfoDictionary.ContainsKey(formationId))
            {
                return(0);
            }
            FormationInfo info = FormationInfoDictionary[formationId];

            return(info.Power);
        }
Ejemplo n.º 3
0
 public void AddAllUnlockFormation(LuaTable datas)
 {
     _formationInfoDictionary.Clear();
     foreach (DictionaryEntry value in datas.ToDictTable())
     {
         LuaTable      table         = (LuaTable)value.Value;
         FormationInfo formationInfo = new FormationInfo(table["id"].ToString().ToInt32(), table["level"].ToString().ToInt32(), (FormationState)(table["formationState"].ToString().ToInt32()));
         formationInfo.isActiveAdditionAttr        = table["isActiveAdditionAttr"].ToString().ToBoolean();
         FormationInfoDictionary[formationInfo.id] = formationInfo;
     }
 }
Ejemplo n.º 4
0
        ///解锁阵型
        public void AddAllUnlockFormation(List <LineupProtoData> datas)
        {
            _formationInfoDictionary.Clear();
            LineupProtoData data;

            for (int i = 0, count = datas.Count; i < count; i++)
            {
                data = datas[i];
                FormationInfo formationInfo = new FormationInfo(data.no, data.lv, FormationState.NotInUse);
                FormationInfoDictionary[formationInfo.id] = formationInfo;
            }
        }