Exemplo n.º 1
0
 public MonsterData CreateInstance()
 {
     MonsterData data = new MonsterData ();
     data.info = this;
     data.name = name;
     data.attack = attack;
     data.speed = speed;
     data.defense = defense;
     data.health = new Util.AutoRecoveryInt<Util.TurnCounter>();
     data.health.recovery = health.recovery;
     data.health.interval = health.interval;
     data.health.value = maxHealth;
     data.health.max = maxHealth;
     data.reward = reward.CreateInstance ();
     for (int i=0; i<equipments.Length; i++) {
         if(null != equipments[i])
         {
             data.EquipItem(equipments[i].CreateInstance() as EquipmentItemData, (Character.EquipPart)i);
         }
     }
     return data;
 }