Пример #1
0
    protected override void SetValues()
    {
        if (!isPrebuilt)
        {
            turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.catapult1s);
        }
        else
        {
            switch (level)
            {
            case 1:
                if (faction == Faction.black)
                {
                    turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.blackCatapult1s);
                }
                else if (faction == Faction.white)
                {
                    turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.whiteCatapult1s);
                }
                break;

            case 2:
                if (faction == Faction.black)
                {
                    turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.blackCatapult2s);
                }
                else if (faction == Faction.white)
                {
                    turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.whiteCatapult2s);
                }
                break;

            case 3:
                if (faction == Faction.black)
                {
                    turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.blackCatapult3s);
                }
                else if (faction == Faction.white)
                {
                    turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.whiteCatapult3s);
                }
                break;

            default:
                print("Error in Level");
                break;
            }
        }
    }
Пример #2
0
    protected override void UpgradeStats()
    {
        if (!isPrebuilt)
        {
            switch (level)
            {
            case 1:
                turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.catapult1s);
                break;

            case 2:
                turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.catapult2s);
                break;

            case 3:
                turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.catapult3s);
                break;

            default:
                print("Error in Level");
                break;
            }
        }
        else         //Incase there is a need for upgrading of turrets as events
        {
            switch (level)
            {
            case 1:
                if (faction == Faction.black)
                {
                    turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.blackCatapult1s);
                }
                else if (faction == Faction.white)
                {
                    turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.whiteCatapult1s);
                }
                break;

            case 2:
                if (faction == Faction.black)
                {
                    turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.blackCatapult2s);
                }
                else if (faction == Faction.white)
                {
                    turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.whiteCatapult2s);
                }
                break;

            case 3:
                if (faction == Faction.black)
                {
                    turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.blackCatapult3s);
                }
                else if (faction == Faction.white)
                {
                    turretValues = TurretValueSettings.SetValuesCorrectly(TurretValueSettings.whiteCatapult3s);
                }
                break;

            default:
                print("Error in Level");
                break;
            }
        }
    }