public ComboSwordSoulInfo LookUp(int id) { ComboSwordSoulInfo info = null; if (m_map.TryGetValue(id, out info)) { return(info); } return(null); }
public void Load(byte[] bytes) { m_map = new Dictionary <int, ComboSwordSoulInfo>(); BinaryHelper helper = new BinaryHelper(bytes); int sceneCount = helper.ReadInt(); for (int index = 0; index < sceneCount; ++index) { ComboSwordSoulInfo info = new ComboSwordSoulInfo(); info.Load(helper); m_map.Add(info.m_comboValue, info); } }
public void Add(int combo, ENAddComboType type) { ComboSwordSoulInfo info = GameTable.ComboSwordSoulAsset.LookUp(combo); if (info == null) { if (combo != 1 && combo != 0) { Debug.LogWarning("combo soul charge error,combo:" + combo); } return; } float addValue = 0; switch (type) { case ENAddComboType.enNormal: { if (info.m_normalResult >= MinNormal) { addValue += info.m_normalResult; } } break; case ENAddComboType.enBreak: { addValue += info.m_breakResult; } break; } if (addValue > 0) { SwordSoulValue += addValue; if (SwordSoulValue > MaxValue) { SwordSoulValue = MaxValue; } BattleArena.Singleton.NotifyChanged((int)BattleArena.ENPropertyChanged.enSwordSoul, null); } }