public static void CallActivatePowerup(PowerupTypes powerupType, float powerupDuration = 0, int powerupAmount = 1, float speedMultiplier = 1) { if (ActivatePowerup != null) { ActivatePowerup(powerupType, powerupDuration, powerupAmount, speedMultiplier); } }
public void PowerupDebugger(PowerupTypes type, ref bool debug) { Powerup p = SpawnPowerup(); p.GrabPlayerWhoEarnedIt(debuggingPlayer); p.SetUpPowerup(type); debug = false; }
static IPowerup GetPowerUpFromType(PowerupTypes type) { switch (type) { case PowerupTypes.JUMP_BOOST: return(new JumpBoostEffect()); case PowerupTypes.SPEED_BOOST: return(new SpeedBoostEffect()); case PowerupTypes.DAMAGE_BOOST: return(new DamageBoostEffect()); case PowerupTypes.SHIELD: return(new ShieldEffect()); } throw new NotImplementedException("There is no powerup for this yet lmao"); }
public void ActivatePowerup(PowerupTypes powerup) { PlaySound(powerupSound); switch (powerup) { case PowerupTypes.TripleShot: TripleShotActive(); break; case PowerupTypes.Speed: SpeedUP(); break; case PowerupTypes.Shields: ActivateShield(); break; } }
/// <summary> /// Sets the type of the powerup, must be done after instantiated because unity is special. /// </summary> /// <param name="aType">The powerup type.</param> public void SetPowerUpType(PowerupTypes aType) { myPowerupType = aType; SetPowerUpColor(GetColorFromPowerUp(myPowerupType)); gameObject.SetActive(true); }
Color GetColorFromPowerUp(PowerupTypes type) { return(GetPowerupMetadataWithType(type).Color); }
public PowerupMetadata GetPowerupMetadataWithType(PowerupTypes type) { return(myPowerupMetas.First(m => m.Type == type)); }