// Generates references to each type of powerup object
    public static void GenerateAllPowerups()
    {
        if (PowerUps == null)
        {
            //initializes the array
            PowerUps = new PowerUp[GlobalVars.POWERUP_COUNT];

            //the array of all possible PowerUps the spawned PowerUp could be
            PowerUps[0] = new LaneConversion(durationLaneConversion);
            PowerUps[1] = new SlowFall(fallSpeedModifierSlowFall, timeBonusSlowFall, durationSlowFall);
            PowerUps[2] = new Fuel(timeBonusAddTime);
            PowerUps[3] = new Multiply(multiplierElementMultiply);
            PowerUps[4] = new BucketShield(bucketShieldHitPoints);
            PowerUps[5] = new TapToCollect(durationTapToCollect);
            PowerUps[6] = new Invincible(durationInvincible, spawnRateModifierInvincible);
            PowerUps[7] = new TotalConversion(durationTotalConversion);
            PowerUps[8] = new CollectAll();
        }
    }
    // Use this for initialization
    void Start()
    {
        //make PowerUpScreen active since Content is referenced
        powerScreen = GameObject.Find ("Canvas/PowerUpScreen");
        powerScreen.SetActive (true);
        contentList = GameObject.Find ("Canvas/PowerUpScreen/ScrollView/Content");
        powerScreen.SetActive (false);

        buttonScale = new Vector3 (buttonSize, buttonSize, buttonSize);
        upgradeBarImages = new Sprite[]{upgradeBar0,upgradeBar1,upgradeBar2,upgradeBar3};
        upgradeCardImages = new Sprite[]{upgradeCard0,upgradeCard1,upgradeCard2,upgradeCard3};

        PowerUps = new PowerUp[GlobalVars.POWERUP_COUNT];

        //the array of all possible PowerUps the spawned PowerUp could be
        PowerUps[0] = new LaneConversion(DEFAULT_NUMBER);
        PowerUps[1] = new SlowFall(DEFAULT_NUMBER,DEFAULT_NUMBER,DEFAULT_NUMBER);
        PowerUps[2] = new Fuel(DEFAULT_NUMBER) ;
        PowerUps[3] = new Multiply(DEFAULT_NUMBER,DEFAULT_NUMBER);
        PowerUps[4] = new BucketShield(DEFAULT_NUMBER);
        PowerUps[5] = new TapToCollect(DEFAULT_NUMBER);
        PowerUps[6] = new Invincible(DEFAULT_NUMBER, DEFAULT_NUMBER);
        PowerUps[7] = new TotalConversion(DEFAULT_NUMBER);
        PowerUps[8] = new CollectAll();

        powerDescriptions = new string[TOTAL_BASE_POWERUPS*UPGRADE_LEVELS]{
            "Tap or drag this ability into a specific lane to convert the elements contained to the lane’s elemental type.",//power 1, level 1
            "Tap or drag this ability into a specific lane to convert the elements contained, and an adjacent lane, to each lane’s elemental type.",//power 1, level 2
            "Tap or drag this ability to convert the elements contained within each lane to the lane’s elemental type.",//power 1, level 3
            "Tap or drag this ability into a specific lane to slow down the fall of elements contained.",//power 2, level 1
            "Tap or drag this ability into a specific lane to significantly slow down the fall of elements contained.",//power 2, level 2
            "Tap or drag this ability to significantly slow down the fall all elements.",//power 2, level 3
            "Your fuel does not deplete for a certain duration.",//power 3, level 1
            "You gain additional fuel and it does not deplete for a certain duration.",//power 3, level 2
            "You gain a significant amount of additional fuel and it does not deplete for a certain duration.",//power 3, level 3
            "Tap or drag this ability into a specific lane to receive a score multiplier for the elements collected of that lane’s elemental type.",//power 4, level 1
            "Tap or drag this ability into a specific lane to receive a score multiplier for the elements collected of that lane’s elemental type, and an adjacent lane’s elemental type.",//power 4, level 2
            "Tap or drag this ability to receive a score multiplier for elements collected of all elemental types.",//power 4, level 3
            "Tap or drag this ability into a specific lane to give that lane no miss penalty for the next 2 incorrect elements that fall into it.",//power 5, level 1
            "Tap or drag this ability into a specific lane to give that lane no miss penalty for the next 4 incorrect elements that fall into it.",//power 5, level 2
            "Tap or drag this ability to give all lanes no miss penalty for the next 4 incorrect elements that fall into them, for each lane.",//power 5, level 3
            "Simply tap elements to automatically collect them.",//power 6, level 1
            "Simply tap elements to automatically collect them.",//power 6, level 2
            "Simply tap elements to automatically collect them.",//power 6, level 3
            "Tap or drag this ability into a specific lane to give that lane no miss penalty for a small amount of time.",//power 7, level 1
            "Tap or drag this ability into a specific lane to give that lane no miss penalty for a decent amount of time.",//power 7, level 2
            "Tap or drag this ability to give all lanes no miss penalty for a decent amount of time.",//power 7, level 3
            "Tap or drag this ability into a specific lane to convert all spawned elements to the lane’s elemental type for a small amount of time.",//power 8, level 1
            "Tap or drag this ability into a specific lane to convert all spawned elements to the lane’s elemental type for a decent amount of time.",//power 8, level 2
            "Tap or drag this ability into a specific lane to convert all spawned elements to the lane’s elemental type and gain invincibility for a decent amount of time.",//power 8, level 3
            "Tap or drag this ability into a specific lane to automatically collect all elements in that lane.",//power 9, level 1
            "Tap or drag this ability into a specific lane to automatically collect all elements in that lane and an adjacent lane.",//power 9, level 2
            "Tap or drag this ability to automatically collect all elements in all lanes."};//power 9, level 3

        bonusTexts = new string[TOTAL_BASE_POWERUPS*UPGRADE_LEVELS]{
            "1 Lane",//power 1, level 1
            "2 Lanes",//power 1, level 2
            "All Lanes",//power 1, level 3
            "Slow",//power 2, level 1
            "Slower",//power 2, level 2
            "Slower & All Lanes",//power 2, level 3
            "Fuel",//power 3, level 1
            "Fuel+",//power 3, level 2
            "Fuel++",//power 3, level 3
            "1 Element",//power 4, level 1
            "2 Elements",//power 4, level 2
            "4 Element",//power 4, level 3
            "2 Saves & 1 Lane",//power 5, level 1
            "4 Saves & 1 Lane",//power 5, level 2
            "4 Saves & All Lanes",//power 5, level 3
            "Tap Time",//power 6, level 1
            "Tap Time+",//power 6, level 2
            "Tap Time++",//power 6, level 3
            "Invincible Time & 1 Lane",//power 7, level 1
            "Invincible Time+ & 1 Lane",//power 7, level 2
            "Invincible Time+ & All Lanes",//power 7, level 3
            "Conversion Time",//power 8, level 1
            "Conversion Time+",//power 8, level 2
            "Conversion Time+ & Invincible",//power 8, level 3
            "1 Lane",//power 9, level 1
            "2 Lanes",//power 9, level 2
            "All Lanes"};//power 9, level 3

        elem = new string[TOTAL_BASE_POWERUPS*TIMES_UPGRADED,TYPES_OF_ELEMENTS_PER_UNLOCK]{
            {FirstPowerUpElements[0], FirstPowerUpElements[1], FirstPowerUpElements[2], FirstPowerUpElements[3]},//power 1, upgrade 1
            {"magma","cloud","mud","energy"},//power 1, upgrade 2
            {"desert","earthquake","blizzard","mountain"},//power 2, upgrade 1
            {"storm","glass","clay","brick"},//power 2, upgrade 2
            {"coal","volcano","tornado","glacier"},//power 3, upgrade 1
            {"ion","fission","ceramics","monsoon"},//power 3, upgrade 2
            {"diamond","aurora","smoke","flood"},//power 4, upgrade 1
            {"metal","grass","radiation","tsunami"},//power 4, upgrade 2
            {"meteoroid","supernova","archipelago","rust"},//power 5, upgrade 1
            {"wasteland","voltage","tide","edifice"},//power 5, upgrade 2
            {"algae","pulsar","dynamo","windmill"},//power 6, upgrade 1
            {"aliens","fusion","whirlpool","resistance"},//power 6, upgrade 2
            {"forest","crater","maze","apocalypse"},//power 7, upgrade 1
            {"dreams","balance","coincidence","fate"},//power 7, upgrade 2
            {"valley","fruit","sorcery","prophecy"},//power 8, upgrade 1
            {"inertia","morality","method","insight"},//power 8, upgrade 2
            {"emotion","chaos","deception","reason"},//power 9, upgrade 1
            {"information","chronology","absurd","motivation"}};//power 9, upgrade 2
        cost = new int[TOTAL_BASE_POWERUPS*TIMES_UPGRADED,TYPES_OF_ELEMENTS_PER_UNLOCK]{
            {50, 50, 50, 50},//power 1, upgrade 1
            {99,99,99,99},//power 1, upgrade 2
            {50,50,50,50},//power 2, upgrade 1
            {99,99,99,99},//power 2, upgrade 2
            {50,50,50,50},//power 3, upgrade 1
            {99,99,99,99},//power 3, upgrade 2
            {50,50,50,50},//power 4, upgrade 1
            {99,99,99,99},//power 4, upgrade 2
            {50,50,50,50},//power 5, upgrade 1
            {99,99,99,99},//power 5, upgrade 2
            {50,50,50,50},//power 6, upgrade 1
            {99,99,99,99},//power 6, upgrade 2
            {50,50,50,50},//power 7, upgrade 1
            {99,99,99,99},//power 7, upgrade 2
            {50,50,50,50},//power 8, upgrade 1
            {99,99,99,99},//power 8, upgrade 2
            {50,50,50,50},//power 9, upgrade 1
            {99,99,99,99}};//power 9, upgrade 2

        notEnoughColor = new Color(255.0f/255.0f,135.0f/255.0f,126.0f/255.0f);
    }
Exemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        //make PowerUpScreen active since Content is referenced
        powerScreen = GameObject.Find("Canvas/PowerUpScreen");
        powerScreen.SetActive(true);
        contentList = GameObject.Find("Canvas/PowerUpScreen/ScrollView/Content");
        powerScreen.SetActive(false);

        buttonScale       = new Vector3(buttonSize, buttonSize, buttonSize);
        upgradeBarImages  = new Sprite[] { upgradeBar0, upgradeBar1, upgradeBar2, upgradeBar3 };
        upgradeCardImages = new Sprite[] { upgradeCard0, upgradeCard1, upgradeCard2, upgradeCard3 };

        PowerUps = new PowerUp[GlobalVars.POWERUP_COUNT];

        //the array of all possible PowerUps the spawned PowerUp could be
        PowerUps[0] = new LaneConversion(DEFAULT_NUMBER);
        PowerUps[1] = new SlowFall(DEFAULT_NUMBER, DEFAULT_NUMBER, DEFAULT_NUMBER);
        PowerUps[2] = new Fuel(DEFAULT_NUMBER);
        PowerUps[3] = new Multiply(DEFAULT_NUMBER, DEFAULT_NUMBER);
        PowerUps[4] = new BucketShield(DEFAULT_NUMBER);
        PowerUps[5] = new TapToCollect(DEFAULT_NUMBER);
        PowerUps[6] = new Invincible(DEFAULT_NUMBER, DEFAULT_NUMBER);
        PowerUps[7] = new TotalConversion(DEFAULT_NUMBER);
        PowerUps[8] = new CollectAll();

        powerDescriptions = new string[TOTAL_BASE_POWERUPS * UPGRADE_LEVELS] {
            "Tap or drag this ability into a specific lane to convert the elements contained to the lane’s elemental type.",                                                                //power 1, level 1
            "Tap or drag this ability into a specific lane to convert the elements contained, and an adjacent lane, to each lane’s elemental type.",                                        //power 1, level 2
            "Tap or drag this ability to convert the elements contained within each lane to the lane’s elemental type.",                                                                    //power 1, level 3
            "Tap or drag this ability into a specific lane to slow down the fall of elements contained.",                                                                                   //power 2, level 1
            "Tap or drag this ability into a specific lane to significantly slow down the fall of elements contained.",                                                                     //power 2, level 2
            "Tap or drag this ability to significantly slow down the fall all elements.",                                                                                                   //power 2, level 3
            "Your fuel does not deplete for a certain duration.",                                                                                                                           //power 3, level 1
            "You gain additional fuel and it does not deplete for a certain duration.",                                                                                                     //power 3, level 2
            "You gain a significant amount of additional fuel and it does not deplete for a certain duration.",                                                                             //power 3, level 3
            "Tap or drag this ability into a specific lane to receive a score multiplier for the elements collected of that lane’s elemental type.",                                        //power 4, level 1
            "Tap or drag this ability into a specific lane to receive a score multiplier for the elements collected of that lane’s elemental type, and an adjacent lane’s elemental type.", //power 4, level 2
            "Tap or drag this ability to receive a score multiplier for elements collected of all elemental types.",                                                                        //power 4, level 3
            "Tap or drag this ability into a specific lane to give that lane no miss penalty for the next 2 incorrect elements that fall into it.",                                         //power 5, level 1
            "Tap or drag this ability into a specific lane to give that lane no miss penalty for the next 4 incorrect elements that fall into it.",                                         //power 5, level 2
            "Tap or drag this ability to give all lanes no miss penalty for the next 4 incorrect elements that fall into them, for each lane.",                                             //power 5, level 3
            "Simply tap elements to automatically collect them.",                                                                                                                           //power 6, level 1
            "Simply tap elements to automatically collect them.",                                                                                                                           //power 6, level 2
            "Simply tap elements to automatically collect them.",                                                                                                                           //power 6, level 3
            "Tap or drag this ability into a specific lane to give that lane no miss penalty for a small amount of time.",                                                                  //power 7, level 1
            "Tap or drag this ability into a specific lane to give that lane no miss penalty for a decent amount of time.",                                                                 //power 7, level 2
            "Tap or drag this ability to give all lanes no miss penalty for a decent amount of time.",                                                                                      //power 7, level 3
            "Tap or drag this ability into a specific lane to convert all spawned elements to the lane’s elemental type for a small amount of time.",                                       //power 8, level 1
            "Tap or drag this ability into a specific lane to convert all spawned elements to the lane’s elemental type for a decent amount of time.",                                      //power 8, level 2
            "Tap or drag this ability into a specific lane to convert all spawned elements to the lane’s elemental type and gain invincibility for a decent amount of time.",               //power 8, level 3
            "Tap or drag this ability into a specific lane to automatically collect all elements in that lane.",                                                                            //power 9, level 1
            "Tap or drag this ability into a specific lane to automatically collect all elements in that lane and an adjacent lane.",                                                       //power 9, level 2
            "Tap or drag this ability to automatically collect all elements in all lanes."
        };                                                                                                                                                                                  //power 9, level 3

        bonusTexts = new string[TOTAL_BASE_POWERUPS * UPGRADE_LEVELS] {
            "1 Lane",                        //power 1, level 1
            "2 Lanes",                       //power 1, level 2
            "All Lanes",                     //power 1, level 3
            "Slow",                          //power 2, level 1
            "Slower",                        //power 2, level 2
            "Slower & All Lanes",            //power 2, level 3
            "Fuel",                          //power 3, level 1
            "Fuel+",                         //power 3, level 2
            "Fuel++",                        //power 3, level 3
            "1 Element",                     //power 4, level 1
            "2 Elements",                    //power 4, level 2
            "4 Element",                     //power 4, level 3
            "2 Saves & 1 Lane",              //power 5, level 1
            "4 Saves & 1 Lane",              //power 5, level 2
            "4 Saves & All Lanes",           //power 5, level 3
            "Tap Time",                      //power 6, level 1
            "Tap Time+",                     //power 6, level 2
            "Tap Time++",                    //power 6, level 3
            "Invincible Time & 1 Lane",      //power 7, level 1
            "Invincible Time+ & 1 Lane",     //power 7, level 2
            "Invincible Time+ & All Lanes",  //power 7, level 3
            "Conversion Time",               //power 8, level 1
            "Conversion Time+",              //power 8, level 2
            "Conversion Time+ & Invincible", //power 8, level 3
            "1 Lane",                        //power 9, level 1
            "2 Lanes",                       //power 9, level 2
            "All Lanes"
        };                                   //power 9, level 3

        elem = new string[TOTAL_BASE_POWERUPS * TIMES_UPGRADED, TYPES_OF_ELEMENTS_PER_UNLOCK] {
            { FirstPowerUpElements[0], FirstPowerUpElements[1], FirstPowerUpElements[2], FirstPowerUpElements[3] }, //power 1, upgrade 1
            { "magma", "cloud", "mud", "energy" },                                                                  //power 1, upgrade 2
            { "desert", "earthquake", "blizzard", "mountain" },                                                     //power 2, upgrade 1
            { "storm", "glass", "clay", "brick" },                                                                  //power 2, upgrade 2
            { "coal", "volcano", "tornado", "glacier" },                                                            //power 3, upgrade 1
            { "ion", "fission", "ceramics", "monsoon" },                                                            //power 3, upgrade 2
            { "diamond", "aurora", "smoke", "flood" },                                                              //power 4, upgrade 1
            { "metal", "grass", "radiation", "tsunami" },                                                           //power 4, upgrade 2
            { "meteoroid", "supernova", "archipelago", "rust" },                                                    //power 5, upgrade 1
            { "wasteland", "voltage", "tide", "edifice" },                                                          //power 5, upgrade 2
            { "algae", "pulsar", "dynamo", "windmill" },                                                            //power 6, upgrade 1
            { "aliens", "fusion", "whirlpool", "resistance" },                                                      //power 6, upgrade 2
            { "forest", "crater", "maze", "apocalypse" },                                                           //power 7, upgrade 1
            { "dreams", "balance", "coincidence", "fate" },                                                         //power 7, upgrade 2
            { "valley", "fruit", "sorcery", "prophecy" },                                                           //power 8, upgrade 1
            { "inertia", "morality", "method", "insight" },                                                         //power 8, upgrade 2
            { "emotion", "chaos", "deception", "reason" },                                                          //power 9, upgrade 1
            { "information", "chronology", "absurd", "motivation" }
        };                                                                                                          //power 9, upgrade 2
        cost = new int[TOTAL_BASE_POWERUPS * TIMES_UPGRADED, TYPES_OF_ELEMENTS_PER_UNLOCK] {
            { 50, 50, 50, 50 },                                                                                     //power 1, upgrade 1
            { 99, 99, 99, 99 },                                                                                     //power 1, upgrade 2
            { 50, 50, 50, 50 },                                                                                     //power 2, upgrade 1
            { 99, 99, 99, 99 },                                                                                     //power 2, upgrade 2
            { 50, 50, 50, 50 },                                                                                     //power 3, upgrade 1
            { 99, 99, 99, 99 },                                                                                     //power 3, upgrade 2
            { 50, 50, 50, 50 },                                                                                     //power 4, upgrade 1
            { 99, 99, 99, 99 },                                                                                     //power 4, upgrade 2
            { 50, 50, 50, 50 },                                                                                     //power 5, upgrade 1
            { 99, 99, 99, 99 },                                                                                     //power 5, upgrade 2
            { 50, 50, 50, 50 },                                                                                     //power 6, upgrade 1
            { 99, 99, 99, 99 },                                                                                     //power 6, upgrade 2
            { 50, 50, 50, 50 },                                                                                     //power 7, upgrade 1
            { 99, 99, 99, 99 },                                                                                     //power 7, upgrade 2
            { 50, 50, 50, 50 },                                                                                     //power 8, upgrade 1
            { 99, 99, 99, 99 },                                                                                     //power 8, upgrade 2
            { 50, 50, 50, 50 },                                                                                     //power 9, upgrade 1
            { 99, 99, 99, 99 }
        };                                                                                                          //power 9, upgrade 2


        notEnoughColor = new Color(255.0f / 255.0f, 135.0f / 255.0f, 126.0f / 255.0f);
    }
	// Generates references to each type of powerup object
	public static void GenerateAllPowerups () {
		if (PowerUps == null) {
			//initializes the array
			PowerUps = new PowerUp[GlobalVars.POWERUP_COUNT];
			
			//the array of all possible PowerUps the spawned PowerUp could be
			PowerUps[0] = new LaneConversion(durationLaneConversion);
			PowerUps[1] = new SlowFall(fallSpeedModifierSlowFall,timeBonusSlowFall,durationSlowFall);
			PowerUps[2] = new Fuel(timeBonusAddTime) ;
			PowerUps[3] = new Multiply(multiplierElementMultiply);
			PowerUps[4] = new BucketShield(bucketShieldHitPoints);
			PowerUps[5] = new TapToCollect(durationTapToCollect);
			PowerUps[6] = new Invincible(durationInvincible, spawnRateModifierInvincible);
			PowerUps[7] = new TotalConversion(durationTotalConversion);
			PowerUps[8] = new CollectAll();
		}
	}