Exemple #1
0
 public MapSaveData(MapNode[] _nodes, int attack, int target)
 {
     attack_idx = attack;
     target_idx = target;
     nodes      = new NodeSaveData[_nodes.Length];
     for (int i = 0; i < _nodes.Length; ++i)
     {
         nodes[i] = new NodeSaveData(_nodes[i]);
     }
     //System.Comparison<NodeSaveData> comp = (a, b) => a.name.CompareTo(b.name);
     //System.Array.Sort(nodes, comp);
 }
Exemple #2
0
 public void Set(NodeSaveData data)
 {
     Assert.IsTrue(name == data.name);
     team           = data.team;
     army_model_idx = data.model_idx;
     if (army != null)
     {
         DestroyArmy();
     }
     //Assert.IsTrue(army_model_idx > -1);
     if (data.deck != null)
     {
         //if (army == null)
         {
             SpawnArmy();
         }
         army.SetDeck(data.deck);
     }
     //SetTeamColor();   // done at Start once
 }