Esempio n. 1
0
 public void LoadDroidData(DroidData droidData)
 {
     spawnRate = droidData.SpawnRate;
     catchRate = droidData.CatchRate;
     attack    = droidData.Attack;
     defense   = droidData.Defense;
     hp        = droidData.Hp;
     crySound  = Resources.Load(droidData.CrySound) as AudioClip;
 }
Esempio n. 2
0
 public PlayerData(Player player)
 {
     xp         = player.Xp;
     requiredXp = player.LevelBase;
     levelBase  = player.LevelBase;
     lvl        = player.Lvl;
     foreach (GameObject droidObject in player.Droids)
     {
         Droid droid = droidObject.GetComponent <Droid>();
         if (droid != null)
         {
             DroidData data = new DroidData(droid);
             droids.Add(data);
         }
     }
 }