Exemplo n.º 1
0
 public Titan(Faction faction, Battle battleContext, Vector3 position)
 {
     Faction     = faction;
     Name        = Faction.GetTitanName();
     Context     = battleContext;
     Speed       = 1f;
     AFrmor      = 10;
     Mover       = new TitanMover(battleContext.Planet, position, Speed);
     ModuleSlots = new ModuleSlot[12];
     for (int i = 0; i < ModuleSlots.Length; i++)
     {
         ModuleSlots[i] = new ModuleSlot(this);
     }
     Shield         = new Shield(UpdateLives);
     Armor          = new Armor(UpdateLives);
     Accuracy       = new Accuracy();
     Cloaking       = new Cloaking();
     AntiAirDefence = new AntiAirDefence();
     Components     = new List <IComponent>()
     {
         Armor,
         Shield,
         Accuracy,
         Cloaking,
         AntiAirDefence,
         new RocketLauncher(this, Context),
         new Laser(this, Context, Accuracy)
     };
     AddParams(Config.Base);
     Faction.AddUnit(this);
     // TODO kill
     ResourceUnits = 10;
     // ModuleSlots[0].Build(Config.Modules["anti_air"]);
 }
Exemplo n.º 2
0
 public BuilderModule(ModuleData buildModule, ModuleSlot buildSlot)
 {
     ConstructionModule = buildModule;
     slot     = buildSlot;
     FullTime = buildModule.BuildTime;
     timer    = buildModule.BuildTime;
     Id       = ConstructionModule.Id;
 }