예제 #1
0
 private static void fillAvailable(HullType hullType, List <bool> avails)
 {
     avails.Add(true);                                // radar
     avails.Add(true);                                // engine
     avails.Add(true);                                // generator 1
     avails.Add(hullType.getGeneratorSlots() >= 2);   // generator 2
     avails.Add(hullType.getGeneratorSlots() >= 3);   // generator 3
     avails.Add(true);                                // harvester 1
     avails.Add(hullType.getHarvesterSlots() >= 2);   // harvester 2
     avails.Add(true);                                // repairDroid 1
     avails.Add(hullType.getRepairDroidSlots() >= 2); // repairDroid 2
     avails.Add(hullType.getRepairDroidSlots() >= 3); // repairDroid 3
     avails.Add(hullType.getRepairDroidSlots() >= 4); // repairDroid 4
     avails.Add(true);                                // shield 1
     avails.Add(hullType.getShieldSlots() >= 2);      // shield 2
     avails.Add(hullType.getShieldSlots() >= 3);      // shield 3
     avails.Add(hullType.getWeaponSlots() >= 1);      // weapon 1
     avails.Add(hullType.getWeaponSlots() >= 2);      // weapon 2
     avails.Add(hullType.getWeaponSlots() >= 3);      // weapon 3
     avails.Add(hullType.getWeaponSlots() >= 4);      // weapon 4
     avails.Add(hullType.getWeaponSlots() >= 5);      // weapon 5
     avails.Add(true);                                // armor 1
     avails.Add(hullType.getArmorSlots() >= 2);       // armor 2
     avails.Add(hullType.getArmorSlots() >= 3);       // armor 3
     avails.Add(hullType.getArmorSlots() >= 4);       // armor 4
     avails.Add(hullType.getArmorSlots() >= 5);       // armor 5
 }
예제 #2
0
 public void setHull(HullType hullType, Sprite image)
 {
     this.hullType         = hullType;
     hullImage.sprite      = image;
     hullName.text         = hullType.getName();
     hullHealth.text       = "HP: " + hullType.getMaxHealth();
     weaponCount.text      = hullType.getWeaponSlots().ToString();
     armorCount.text       = hullType.getArmorSlots().ToString();
     shieldCount.text      = hullType.getShieldSlots().ToString();
     generatorCount.text   = hullType.getGeneratorSlots().ToString();
     repairDroidCount.text = hullType.getRepairDroidSlots().ToString();
     harvesterCount.text   = hullType.getHarvesterSlots().ToString();
     updateCost();
 }