示例#1
0
 public void TriggerBuff(BuffType pType, float mParam = 0.0f)
 {
     if (pType == BuffType.None)
     {
         Console.WriteLine("ERROR: No buff type specified for target ship");
     }
     else if (pType == BuffType.ShipSlow)
     {
         Buff_ShipSlow e = new Buff_ShipSlow(this);
         e.SetSlowAmount(mParam);
         e.SetSlowDuration(1);
         mBuffsToTrigger.Add(e);
     }
     else if (pType == BuffType.LaserBuff)
     {
         Buff_LaserBuff e = new Buff_LaserBuff(this);
         mBuffsToTrigger.Add(e);
     }
     else if (pType == BuffType.ImproveHandling)
     {
         Buff_ImproveHandling e = new Buff_ImproveHandling(this);
         mBuffsToTrigger.Add(e);
     }
     else if (pType == BuffType.Cloak)
     {
         Buff_Cloak e = new Buff_Cloak(this);
         mBuffsToTrigger.Add(e);
     }
     else if (pType == BuffType.Decloak)
     {
         Buff_Decloak e = new Buff_Decloak(this);
         mBuffsToTrigger.Add(e);
     }
     else if (pType == BuffType.SuperShield)
     {
         Buff_SuperShield e = new Buff_SuperShield(this);
         mBuffsToTrigger.Add(e);
     }
     else if (pType == BuffType.OverchargeEngines)
     {
         Buff_OverchargeEngines e = new Buff_OverchargeEngines(this);
         mBuffsToTrigger.Add(e);
     }
     else if (pType == BuffType.TankShield)
     {
         Buff_TankShield e = new Buff_TankShield(this);
         mBuffsToTrigger.Add(e);
     }
     else if (pType == BuffType.FullShield)
     {
         Buff_FullShield e = new Buff_FullShield(this);
         mBuffsToTrigger.Add(e);
     }
     else if (pType == BuffType.AntiBullets)
     {
         Buff_AntiBullets e = new Buff_AntiBullets(this);
         mBuffsToTrigger.Add(e);
     }
     else if (pType == BuffType.RapidFire)
     {
         Buff_RapidFire e = new Buff_RapidFire(this);
         mBuffsToTrigger.Add(e);
     }
     else
     {
         Console.WriteLine("ERROR: Buff type was not a recognized BuffType");
     }
 }
示例#2
0
 public void TriggerBuff(BuffType pType, float mParam = 0.0f)
 {
     if (pType == BuffType.None)
     {
         Console.WriteLine("ERROR: No buff type specified for target ship");
     }
     else if (pType == BuffType.ShipSlow)
     {
         Buff_ShipSlow e = new Buff_ShipSlow(this);
         e.SetSlowAmount(mParam);
         e.SetSlowDuration(1);
         mBuffsToTrigger.Add(e);
     }
     else if (pType == BuffType.LaserBuff)
     {
         Buff_LaserBuff e = new Buff_LaserBuff(this);
         mBuffsToTrigger.Add(e);
     }
     else if (pType == BuffType.ImproveHandling)
     {
         Buff_ImproveHandling e = new Buff_ImproveHandling(this);
         mBuffsToTrigger.Add(e);
     }
     else if (pType == BuffType.Cloak)
     {
         Buff_Cloak e = new Buff_Cloak(this);
         mBuffsToTrigger.Add(e);
     }
     else if (pType == BuffType.Decloak)
     {
         Buff_Decloak e = new Buff_Decloak(this);
         mBuffsToTrigger.Add(e);
     }
     else if (pType == BuffType.SuperShield)
     {
         Buff_SuperShield e = new Buff_SuperShield(this);
         mBuffsToTrigger.Add(e);
     }
     else if (pType == BuffType.OverchargeEngines)
     {
         Buff_OverchargeEngines e = new Buff_OverchargeEngines(this);
         mBuffsToTrigger.Add(e);
     }
     else if (pType == BuffType.TankShield)
     {
         Buff_TankShield e = new Buff_TankShield(this);
         mBuffsToTrigger.Add(e);
     }
     else if (pType == BuffType.FullShield)
     {
         Buff_FullShield e = new Buff_FullShield(this);
         mBuffsToTrigger.Add(e);
     }
     else if (pType == BuffType.AntiBullets)
     {
         Buff_AntiBullets e = new Buff_AntiBullets(this);
         mBuffsToTrigger.Add(e);
     }
     else if (pType == BuffType.RapidFire)
     {
         Buff_RapidFire e = new Buff_RapidFire(this);
         mBuffsToTrigger.Add(e);
     }
     else
     {
         Console.WriteLine("ERROR: Buff type was not a recognized BuffType");
     }
 }