private void btnAddAreaEffect_Click(object sender, EventArgs e)
 {
     TroopEffectArea item = new TroopEffectArea();
     item.Effect = this.cbSelectAreaEffect.Items[0] as GameObjects.TroopDetail.EventEffect.EventEffect;
     this.EditingEvent.EffectAreas.Add(item);
     this.RefreshAreaEffects();
 }
Esempio n. 2
0
 public void LoadEffectAreaFromString(EventEffectTable eventEffects, string data)
 {
     char[]   separator = new char[] { ' ', '\n', '\r', '\t' };
     string[] strArray  = data.Split(separator, StringSplitOptions.RemoveEmptyEntries);
     this.EffectAreas.Clear();
     for (int i = 0; i < strArray.Length; i += 2)
     {
         TroopEffectArea item = new TroopEffectArea();
         item.Kind   = (EffectAreaKind)int.Parse(strArray[i]);
         item.Effect = eventEffects.GetEventEffect(int.Parse(strArray[i + 1]));
         this.EffectAreas.Add(item);
     }
 }
Esempio n. 3
0
 public void LoadEffectAreaFromString(EventEffectTable eventEffects, string data)
 {
     char[] separator = new char[] { ' ', '\n', '\r', '\t' };
     string[] strArray = data.Split(separator, StringSplitOptions.RemoveEmptyEntries);
     this.EffectAreas.Clear();
     for (int i = 0; i < strArray.Length; i += 2)
     {
         TroopEffectArea item = new TroopEffectArea();
         item.Kind = (EffectAreaKind) int.Parse(strArray[i]);
         item.Effect = eventEffects.GetEventEffect(int.Parse(strArray[i + 1]));
         this.EffectAreas.Add(item);
     }
 }