private void LateUpdate() { if (effected != this) { effected = this; } if (!Application.isPlaying && typeEffective == null) { typeEffective = new List <TypingEffectiveness>(); typeEffective.Add(new TypingEffectiveness()); } for (int i = 0; i < typeEffective.Count; i++) { if (typeEffective[i] == null) { typeEffective = new List <TypingEffectiveness>(); typeEffective.Add(new TypingEffectiveness()); Recreate(i); } if (typeEffective[i].nameAttack.Count != TypeChart.chart.m_types.Count) { Recreate(i); return; } for (int j = 0; j < typeEffective[i].nameAttack.Count; j++) { if (typeEffective[i].nameAttack[j] != TypeChart.chart.m_types[j]) { Recreate(i); } } } }
private void LateUpdate() { if (effected != this) { effected = this; } if (Application.isPlaying) { if (nameAttack == null || nameDefense == null) { LoadValues(); } } if (!Application.isPlaying) { if (hasSavedValues) { LoadValues(); } else if (nameAttack == null || nameDefense == null) { nameAttack = new List <List <string> >(); nameDefense = new List <List <string> >(); indexValueAtt = new List <int>(); indexValueDef = new List <int>(); effect = new List <Effectiveness>(); for (int i = 0; i < nameAttack.Count; i++) { foreach (var item in TypeChart.chart.m_types) { nameAttack[i].Add(item); nameDefense[i].Add(item); indexValueAtt.Add(0); indexValueDef.Add(0); effect.Add(Effectiveness.None); } } } if (nameAttack.Count <= 0 || nameDefense.Count <= 0) { AddNewTyping(); } } }