Esempio n. 1
0
 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;
    }
Esempio n. 3
0
        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");
        }
Esempio n. 4
0
    public void ActivatePowerup(PowerupTypes powerup)
    {
        PlaySound(powerupSound);

        switch (powerup)
        {
        case PowerupTypes.TripleShot:
            TripleShotActive();
            break;

        case PowerupTypes.Speed:
            SpeedUP();
            break;

        case PowerupTypes.Shields:
            ActivateShield();
            break;
        }
    }
Esempio n. 5
0
 /// <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);
 }
Esempio n. 6
0
 Color GetColorFromPowerUp(PowerupTypes type)
 {
     return(GetPowerupMetadataWithType(type).Color);
 }
Esempio n. 7
0
 public PowerupMetadata GetPowerupMetadataWithType(PowerupTypes type)
 {
     return(myPowerupMetas.First(m => m.Type == type));
 }