Пример #1
0
    public void WeaponLevelIndicator(WeaponLevel level)
    {
        switch (level)
        {
        case WeaponLevel.Single:
            this.indicatorSingle.SetActive(true);
            this.animatorSingle.SetBool("exit", false);
            this.indicatorDouble.SetActive(false);
            this.indicatorTripple.SetActive(false);
            this.animatorQuad.SetBool("exit", true);
            this.indicatorQuad.SetActive(false);
            break;

        case WeaponLevel.Dual:
            this.indicatorDouble.SetActive(true);
            this.animatorDouble.SetBool("exit", false);
            this.animatorSingle.SetBool("exit", true);
            break;

        case WeaponLevel.Tripple:
            this.indicatorTripple.SetActive(true);
            this.animatorTripple.SetBool("exit", false);
            this.animatorDouble.SetBool("exit", true);
            break;

        case WeaponLevel.Quad:
            this.indicatorQuad.SetActive(true);
            this.animatorQuad.SetBool("exit", false);
            this.animatorTripple.SetBool("exit", true);
            break;
        }
    }
Пример #2
0
 // Use this for initialization
 void Start()
 {
     rb                    = this.GetComponent <Rigidbody2D>();
     OrbitRange            = 0.5f;
     MassProgressCounter   = 0;
     WeaponProgressCounter = 0;
     weaponLevel           = WeaponLevel.Single;
     if (projManager != null)
     {
         interpolationPeriodStore = projManager.interpolationPeriod;
     }
 }
Пример #3
0
 public void UpdateWeaponLevel()
 {
     Handheld.Vibrate();
     if (weaponLevel == WeaponLevel.Quad)
     {
         weaponLevel = WeaponLevel.Single;
     }
     else
     {
         weaponLevel++;
     }
     progressWeaponManager.WeaponLevelIndicator(WeaponLevel);
 }
Пример #4
0
    private void LevelPlus(int pts)
    {
        level        += 1;
        levelLimScore = (level * 9 - 4) * (level + 2);
        if (pts > levelLimScore)
        {
            LevelPlus(pts);
        }
        else if (pts <= levelLimScore)
        {
            uiController.SetLevel(this, level);
        }

        if (level >= 8 && weaponLevel == WeaponLevel.TANK)
        {
            weaponLevel = WeaponLevel.BULLETSHTORMERR;
            OnUpWeapon();
        }
    }
Пример #5
0
 public void CheckForLevelUp(GameObject cam)
 {
     if (currentExp >= currentLevel.expToNext)
     {
         level++;
         currentExp = 0;
         cam.SendMessage("SetLevelledName", name);
         cam.SendMessage("SetLevelledLevel", level);
         cam.SendMessage("SetLevelledTime", Time.time);
     }
     if (level == 1)
     {
         currentLevel = level1;
     }
     if (level == 2)
     {
         currentLevel = level2;
     }
     if (level == 3)
     {
         currentLevel = level3;
     }
 }
Пример #6
0
        private IFireMethodWeapon fireMethod;       //Determines the recharge pattern for the weapon (when it can fire)


        //Construction
        public Weapon(Textures.TextureName weaponTexture)
            : base(weaponTexture)
        {
            level = WeaponLevel.one;
        }
Пример #7
0
 public void Awake()
 {
     currentLevel = level0;
 }
Пример #8
0
 public bool Modify(int i)
 {
     bool ret = false;
     switch (i)
     {
         case 1:
             if (WeaponLevel == WeaponLevel.One)
             {
                 WeaponLevel = WeaponLevel.Two;
                 ret = true;
             }
             break;
         case 5:
             if (WeaponLevel == WeaponLevel.Two)
             {
                 WeaponLevel = WeaponLevel.Three;
                 ret = true;
             }
             break;
         case 9:
             if (WeaponLevel == WeaponLevel.Three)
             {
                 WeaponLevel = WeaponLevel.Four;
                 ret = true;
             }
             break;
         case 2:
             if (Shield.Level == ShieldEnum.None)
             {
                 Shield.Level = ShieldEnum.One;
                 ret = true;
             }
             break;
         case 6:
             if (Shield.Level == ShieldEnum.One)
             {
                 Shield.Level = ShieldEnum.Two;
                 ret = true;
             }
             break;
         case 10:
             if (Shield.Level == ShieldEnum.Two)
             {
                 Shield.Level = ShieldEnum.Three;
                 ret = true;
             }
             break;
         case 3:
             if (ProjectileLevel == ProjectileLevel.One)
             {
                 ProjectileLevel = ProjectileLevel.Two;
                 ret = true;
             }
             break;
         case 7:
             if (ProjectileLevel == ProjectileLevel.Two)
             {
                 ProjectileLevel = ProjectileLevel.Three;
                 ret = true;
             }
             break;
         case 11:
             if (ProjectileLevel == ProjectileLevel.Three)
             {
                 ProjectileLevel = ProjectileLevel.Four;
                 ret = true;
             }
             break;
         case 4:
             if (EngineLevel == EngineLevel.One)
             {
                 EngineLevel = EngineLevel.Two;
                 ret = true;
             }
             break;
         case 8:
             if (EngineLevel == EngineLevel.Two)
             {
                 EngineLevel = EngineLevel.Three;
                 ret = true;
             }
             break;
         case 12:
             if (!Rainbow)
             {
                 Rainbow = true;
                 ret = true;
             }
             break;
     }
     return ret;
 }
Пример #9
0
 //Construction
 public Weapon(Textures.TextureName weaponTexture)
     : base(weaponTexture)
 {
     level = WeaponLevel.one;
 }
Пример #10
0
 public void ResetWeaponLevel()
 {
     WeaponLevel.SetValue(1);
 }
Пример #11
0
 public void UpgradeWeapon()
 {
     OnUgradeWeapon(GetCurrentUpgradingCostCurve());
     WeaponLevel.AddValue(1);
 }