Exemplo n.º 1
0
 public LightSaberHitEffect(int radius, int gridX, int gridZ, Transform heroTrans, string centerFx, FactionType faction)
 {
     this.targetLocators    = new List <GameObject>();
     this.adjescentLocators = new List <GameObject>();
     this.fxInstances       = new List <GameObject>();
     this.targetBuildings   = new List <SmartEntity>();
     this.entityFlasher     = new EntityFlasher();
     this.heroTrans         = heroTrans;
     if (heroTrans != null)
     {
         TargetingController.TraverseSpiralToFindTargets(radius, gridX, gridZ, new TargetingController.TargetValidator(this.FindClosest), null, false);
         StaticDataController staticDataController = Service.StaticDataController;
         string        text   = null;
         string        cookie = null;
         EffectsTypeVO effectsTypeVO;
         if (faction == FactionType.Empire)
         {
             effectsTypeVO = staticDataController.Get <EffectsTypeVO>("effect199");
         }
         else
         {
             effectsTypeVO = staticDataController.Get <EffectsTypeVO>("effect197");
         }
         if (effectsTypeVO != null)
         {
             text = effectsTypeVO.AssetName;
         }
         effectsTypeVO = staticDataController.Get <EffectsTypeVO>("effect198");
         if (effectsTypeVO != null)
         {
             cookie = effectsTypeVO.AssetName;
         }
         if (centerFx != null)
         {
             Service.AssetManager.Load(ref this.circularHitFxHandle, centerFx, new AssetSuccessDelegate(this.OnLoadCircularFx), null, null);
         }
         if (this.targetLocators.Count > 0)
         {
             if (text != null)
             {
                 Service.AssetManager.Load(ref this.hitFxHandle, text, new AssetSuccessDelegate(this.OnLoadHitFx), null, cookie);
             }
             else
             {
                 Service.Logger.Error("LightSaber Hit Effect not found");
             }
         }
     }
 }
Exemplo n.º 2
0
 public ProjectileController()
 {
     Service.Set <ProjectileController>(this);
     this.entityFlasher = new EntityFlasher();
 }
Exemplo n.º 3
0
 public ProjectileController()
 {
     Service.ProjectileController = this;
     this.entityFlasher           = new EntityFlasher();
 }