示例#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"]);
 }
示例#2
0
 public MoveTask(Vector3 toPosition, TitanMover mover)
 {
     position   = toPosition;
     titanMover = mover;
 }