Advertisement
EagleOwle

StormTrooperConfigList

May 4th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.53 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. [System.Serializable]
  6. public class StormTrooperConfigList : BotClassConfigList
  7. {
  8.     [Header("Реактор")]
  9.     public List<ModulReactorConfig> ReactorConfig;
  10.  
  11.     [Header("Ходовая")]
  12.     public List<ModulPelvicConfig> PelvicConfig;
  13.     [Header("Башня")]
  14.     public List<ModulBodyConfig> BodyConfig;
  15.  
  16.     [Header("Оптика")]
  17.     public List<ModulOpticConfig> OpticConfig;
  18.     [Header("Радар")]
  19.     public List<ModulRadarConfig> RadarConfig;
  20.  
  21.     [Header("Контроллер вращения Орудия левый")]
  22.     public List<ModulGunControllerConfig> GunLControllerConfig;
  23.     [Header("Контроллер вращения Орудия правый")]
  24.     public List<ModulGunControllerConfig> GunRControllerConfig;
  25.     [Header("Орудие правое")]
  26.     public List<ModulGunConfig> GunRConfig;
  27.     [Header("Орудие левое")]
  28.     public List<ModulGunConfig> GunLConfig;
  29.  
  30.     [Header("Контроллер вращения ПРУ левый")]
  31.     public List<ModulGunControllerConfig> LauncherLControllerConfig;
  32.     [Header("Контроллер вращения ПРУ правый")]
  33.     public List<ModulGunControllerConfig> LauncherRControllerConfig;
  34.     [Header("ПРУ правое")]
  35.     public List<ModulLauncherConfig> LauncherRConfig;
  36.     [Header("ПРУ левое")]
  37.     public List<ModulLauncherConfig> LauncherLConfig;
  38.  
  39.     public override StormTrooperConfigList GetStormTrooperConfig()
  40.     {
  41.         return this;
  42.     }
  43.  
  44.     public override ModulPelvicConfig GetPelvicConfig(int index, ModulType type)
  45.     {
  46.         return PelvicConfig[index];
  47.     }
  48.  
  49.     public override ModulBodyConfig GetBodyConfig(int index, ModulType type)
  50.     {
  51.         return BodyConfig[index];
  52.     }
  53.  
  54.     public override ModulReactorConfig GetReactorConfig(int index, ModulType type)
  55.     {
  56.         Debug.Log("GetReactorConfig " + this);
  57.         return ReactorConfig[index];
  58.     }
  59.  
  60.     public override ModulGunConfig GetGunConfig(int index, ModulType type)
  61.     {
  62.         if (type == ModulType.LGun)
  63.         {
  64.             return GunLConfig[index];
  65.         }
  66.  
  67.         if (type == ModulType.RGun)
  68.         {
  69.             return GunRConfig[index];
  70.         }
  71.  
  72.         return null;
  73.     }
  74.  
  75.     public override ModulGunControllerConfig GetGunControllerConfig(int index, ModulType type)
  76.     {
  77.         if (type == ModulType.LGunController)
  78.         {
  79.             return GunLControllerConfig[index];
  80.         }
  81.  
  82.         if (type == ModulType.RGunController)
  83.         {
  84.             return GunRControllerConfig[index];
  85.         }
  86.  
  87.         if (type == ModulType.LLauncherController)
  88.         {
  89.             return LauncherLControllerConfig[index];
  90.         }
  91.  
  92.         if (type == ModulType.RLauncherController)
  93.         {
  94.             return LauncherRControllerConfig[index];
  95.         }
  96.  
  97.         return null;
  98.     }
  99.  
  100.     public override ModulLauncherConfig GetLauncherConfig(int index, ModulType type)
  101.     {
  102.         if (type == ModulType.LLauncher)
  103.         {
  104.             return LauncherLConfig[index];
  105.         }
  106.  
  107.         if (type == ModulType.RLauncher)
  108.         {
  109.             return LauncherRConfig[index];
  110.         }
  111.  
  112.         return null;
  113.     }
  114.  
  115.     public override ModulOpticConfig GetOpticConfig(int index, ModulType type)
  116.     {
  117.         return OpticConfig[index];
  118.     }
  119.  
  120.     public override ModulRadarConfig GetRadarConfig(int index, ModulType type)
  121.     {
  122.         return RadarConfig[index];
  123.     }
  124. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement