コード例 #1
0
ファイル: Booster.cs プロジェクト: 2ez-bit/Ultimatefighter
 protected Booster(int id, BoostTypes typeOfBoost, BoosterTypes boosterType, int damageBoost, int shieldBoost, int healthBoost,
                   int boxRewardBoost)
 {
     Id             = id;
     BoostType      = typeOfBoost;
     Type           = boosterType;
     DamageBoost    = damageBoost;
     ShieldBoost    = shieldBoost;
     HealthBoost    = healthBoost;
     BoxRewardBoost = boxRewardBoost;
 }
コード例 #2
0
    public static void GetBooster(BoosterTypes boosterType)
    {
        var index = (int)boosterType;

        openAndCloseCore.Open(boosters[index].transform);
        boostersImage[index]            = (boosters[index].GetComponent <Image>());
        boostersImage[index].fillAmount = 1f;

        if (boosterType == BoosterTypes.speed)
        {
            animatorController.IncreaseAnimationSpeed(1.5f);
        }
    }
コード例 #3
0
ファイル: Booster.cs プロジェクト: PukieDiederik/LudumDare42
    static BoosterTypes bt = BoosterTypes.Speed;        //Booster type


    public static void OnPickup()
    {
        bt = (BoosterTypes)Random.Range(0, 2);

        switch (bt)
        {
        case BoosterTypes.Speed:
            SpeedBooster();
            break;

        case BoosterTypes.SuperBreak:
            SuperBreakerBooster();
            break;

        case BoosterTypes.Shield:
            ShieldBooster();
            break;

        default:
            Debug.LogError(bt);
            break;
        }
    }