Пример #1
0
    void characterUpgrade()
    {
        CharacterInfo[] selectableCharacters = UFE.GetVersusModeSelectableCharacters();
        CharacterInfo   character1           = selectableCharacters [characterUpgradeValue];

        UFE.SetPlayer(1, character1);
        UFE.HideScreen(UFE.currentScreen);
        UFE.successUI(0f);
    }
Пример #2
0
    IEnumerator Ftree()
    {
        yield return(new WaitForSeconds(3f));

        UFE.HideScreen(UFE.currentScreen);
        UFE.weaponPopup(0f);
        coinsText        = GameObject.Find("BuyWeaponPopUp(Clone)").transform.GetChild(2).GetChild(0).GetComponent <UnityEngine.UI.Text>();
        coinsText.text   = Firstfightcoin;
        diamondText      = GameObject.Find("BuyWeaponPopUp(Clone)").transform.GetChild(3).GetChild(0).GetComponent <UnityEngine.UI.Text>();
        diamondText.text = "  " + Firstfightdiamond;
        editText         = GameObject.Find("BuyWeaponPopUp(Clone)").transform.GetChild(4).GetChild(0).GetComponent <UnityEngine.UI.Text>();
        editText.text    = "wait";
    }
Пример #3
0
    public void okMthd()
    {
        int newLife = (int)(PlayerPrefs.GetFloat("HEALTH"));

        if (newLife <= 500 / 2)
        {
            UFE.HideScreen(UFE.currentScreen);
            UFE.updateEnergy(0f);
        }
        else
        {
            IntroScreen.characterValue = 100;
            UFE.HideScreen(UFE.currentScreen);
            UFE.StartGame(0);
        }
    }
Пример #4
0
    public void waitMethod()
    {
        Text val = GameObject.FindGameObjectWithTag("level2BuyGadha").transform.GetChild(1).GetComponent <UnityEngine.UI.Text>();

        if (CheckIN_Index == 0)
        {
            val.text = "Are you sure want to wait or\nyou want to buy diamonds or\nwatch a video for Upgrading Weapon";
            CheckIN_Index++;
        }
        else if (CheckIN_Index == 1)
        {
            PlayerPrefs.SetString("WaitScene", "UFE_UPDATEENERGY _WAIT");
            CheckIN_Index = 0;
            UFE.HideScreen(UFE.currentScreen);
            UFE.timerUI(0f);
        }
        else
        {
        }
    }
Пример #5
0
    public void diamondMethod()
    {
        int diamondCount = PlayerPrefs.GetInt("DIAMOND");

        btn = GameObject.FindGameObjectWithTag("DiamondTag");
        btn.GetComponent <Button> ().interactable = false;
        string Value        = btn.transform.GetChild(0).GetComponent <UnityEngine.UI.Text> ().text;
        int    diamondValue = int.Parse(Value);

        if (diamondCount >= diamondValue)
        {
            diamondCount = diamondCount - diamondValue;
            PlayerPrefs.SetInt("DIAMOND", diamondCount);
            UFE.diamondCheck           = true;
            IntroScreen.characterValue = 100;
            UFE.StartGame(0);
        }
        else
        {
            UFE.HideScreen(UFE.currentScreen);
            UFE.alertUI(0f);
        }
    }
Пример #6
0
    // Update is called once per frame
    void Update()
    {
        DateTime currentTime = System.DateTime.Now;

        int timeDiff = (int)currentTime.Subtract(timerStartTime).TotalSeconds;

        time = waitTime - timeDiff;

        float f       = time / waitTime;
        int   minutes = time / 60;       //Divide the guiTime by sixty to get the minutes.
        int   seconds = time % 60;       //Use the euclidean division for the seconds.

        //update the label value
        timerLabel.text = string.Format("{0:00} : {1:00}", minutes, seconds);

        if (time < 0)
        {
            PlayerPrefs.SetInt("isWaiting", 0);
            string str = PlayerPrefs.GetString("WaitScene");
            if (str.Equals("UFE_WAIT"))
            {
                Fight = PlayerPrefs.GetInt("FIGHTTAG");
                string level_fgt = PlayerPrefs.GetString("LEVEL");
                if (level_fgt.Equals("LEVELI"))
                {
                    level = 1;
                }
                else if (level_fgt.Equals("LEVELII"))
                {
                    level = 2;
                }
                else if (level_fgt.Equals("LEVELIII"))
                {
                    level = 3;
                }

                switch (Fight)
                {
                case 0:
                    if (level == 3)
                    {
                        characterUpgradeValue      = 23;
                        WeaponPopUp.level3buygadha = true;
                    }
                    else if (level == 2)
                    {
                        characterUpgradeValue      = 14;
                        WeaponPopUp.level2buygadha = true;
                    }
                    else
                    {
                        characterUpgradeValue = 0;
                        WeaponPopUp.buygadha1 = true;
                    }
                    this.characterUpgrade();
                    break;

                case 1:
                    if (level == 3)
                    {
                        characterUpgradeValue       = 24;
                        WeaponPopUp.level3buygadha2 = true;
                    }
                    else if (level == 2)
                    {
                        characterUpgradeValue       = 15;
                        WeaponPopUp.level2buyarmour = true;
                    }
                    else
                    {
                        characterUpgradeValue = 6;
                        WeaponPopUp.buygadha2 = true;
                    }
                    this.characterUpgrade();
                    break;

                case 2:
                    if (level == 3)
                    {
                        characterUpgradeValue       = 22;
                        WeaponPopUp.level3buyarmour = true;
                    }
                    else if (level == 2)
                    {
                        characterUpgradeValue       = 16;
                        WeaponPopUp.level2buygadha2 = true;
                    }
                    else
                    {
                        characterUpgradeValue  = 7;
                        WeaponPopUp.buyArmour1 = true;
                    }
                    this.characterUpgrade();
                    break;

                case 3:
                    if (level == 3)
                    {
                    }
                    else if (level == 2)
                    {
                        characterUpgradeValue        = 17;
                        WeaponPopUp.level2buyarmour2 = true;
                    }
                    else
                    {
                        characterUpgradeValue = 8;
                        WeaponPopUp.buygadha3 = true;
                    }
                    this.characterUpgrade();
                    break;

                case 4:
                    if (level == 3)
                    {
                    }
                    else if (level == 2)
                    {
                        characterUpgradeValue        = 25;
                        WeaponPopUp.level2buyarmour3 = true;
                    }
                    else
                    {
                        characterUpgradeValue  = 9;
                        WeaponPopUp.buyArmour2 = true;
                    }
                    this.characterUpgrade();
                    break;
                }
            }
            else if (str.Equals("UFE_UPDATEENERGY _WAIT"))
            {
                IntroScreen.characterValue = 100;
                UFE.HideScreen(UFE.currentScreen);
                UFE.StartGame(0);
            }
        }
    }
Пример #7
0
    void mainBuyMthd()
    {
        int    Fight     = PlayerPrefs.GetInt("FIGHTTAG");
        string level_fgt = PlayerPrefs.GetString("LEVEL");

        if (level_fgt.Equals("LEVELI"))
        {
            level = 1;
        }
        else if (level_fgt.Equals("LEVELII"))
        {
            level = 2;
        }
        else if (level_fgt.Equals("LEVELIII"))
        {
            level = 3;
        }
        switch (Fight)
        {
        case 0:
            if (diamondCount >= 1)
            {
                diamondCount = diamondCount - 1;
                PlayerPrefs.SetInt("DIAMOND", diamondCount);
                if (level == 3)
                {
                    characterUpgradeValue      = 23;
                    WeaponPopUp.level3buygadha = true;
                }
                else if (level == 2)
                {
                    characterUpgradeValue      = 14;
                    WeaponPopUp.level2buygadha = true;
                }
                else
                {
                    characterUpgradeValue = 0;
                    WeaponPopUp.buygadha1 = true;
                }
                this.characterUpgrade();
            }
            else
            {
                UFE.HideScreen(UFE.currentScreen);
                UFE.alertUI(0f);
            }
            break;

        case 1:
            if (diamondCount >= 2)
            {
                diamondCount = diamondCount - 2;
                PlayerPrefs.SetInt("DIAMOND", diamondCount);
                if (level == 3)
                {
                    characterUpgradeValue       = 24;
                    WeaponPopUp.level3buygadha2 = true;
                }
                else if (level == 2)
                {
                    characterUpgradeValue       = 15;
                    WeaponPopUp.level2buyarmour = true;
                }
                else
                {
                    characterUpgradeValue = 6;
                    WeaponPopUp.buygadha2 = true;
                }
                this.characterUpgrade();
            }
            else
            {
                UFE.HideScreen(UFE.currentScreen);
                UFE.alertUI(0f);
            }
            break;

        case 2:
            if (diamondCount >= 3)
            {
                diamondCount = diamondCount - 3;
                PlayerPrefs.SetInt("DIAMOND", diamondCount);
                if (level == 3)
                {
                    characterUpgradeValue       = 22;
                    WeaponPopUp.level3buyarmour = true;
                }
                else if (level == 2)
                {
                    characterUpgradeValue       = 16;
                    WeaponPopUp.level2buygadha2 = true;
                }
                else
                {
                    characterUpgradeValue  = 7;
                    WeaponPopUp.buyArmour1 = true;
                }
                this.characterUpgrade();
            }
            else
            {
                UFE.HideScreen(UFE.currentScreen);
                UFE.alertUI(0f);
            }
            break;

        case 3:
            if (diamondCount >= 4)
            {
                diamondCount = diamondCount - 4;
                PlayerPrefs.SetInt("DIAMOND", diamondCount);
                if (level == 3)
                {
                }
                else if (level == 2)
                {
                    characterUpgradeValue        = 17;
                    WeaponPopUp.level2buyarmour2 = true;
                }
                else
                {
                    characterUpgradeValue = 8;
                    WeaponPopUp.buygadha3 = true;
                }
                this.characterUpgrade();
            }
            else
            {
                UFE.HideScreen(UFE.currentScreen);
                UFE.alertUI(0f);
            }
            break;

        case 4:
            if (diamondCount >= 5)
            {
                diamondCount = diamondCount - 5;
                PlayerPrefs.SetInt("DIAMOND", diamondCount);
                if (level == 3)
                {
                }
                else if (level == 2)
                {
                    characterUpgradeValue        = 25;
                    WeaponPopUp.level2buyarmour3 = true;
                }
                else
                {
                    characterUpgradeValue  = 9;
                    WeaponPopUp.buyArmour2 = true;
                }
                this.characterUpgrade();
            }
            else
            {
                UFE.HideScreen(UFE.currentScreen);
                UFE.alertUI(0f);
            }
            break;
        }
    }
Пример #8
0
 public void coinsMthd()
 {
     UFE.HideScreen(UFE.currentScreen);
     UFE.alertUI(0f);
 }
Пример #9
0
    public void instant()
    {
        Fight = PlayerPrefs.GetInt("FIGHTTAG");
        int diamondCount = PlayerPrefs.GetInt("DIAMOND");

        btn = GameObject.FindGameObjectWithTag("DiamondTag");
        btn.GetComponent <Button>().interactable = false;
        string Value        = btn.transform.GetChild(0).GetComponent <UnityEngine.UI.Text> ().text;
        int    diamondValue = int.Parse(Value);
        string level_fgt    = PlayerPrefs.GetString("LEVEL");

        if (level_fgt.Equals("LEVELI"))
        {
            level = 1;
        }
        else if (level_fgt.Equals("LEVELII"))
        {
            level = 2;
        }
        else if (level_fgt.Equals("LEVELIII"))
        {
            level = 3;
        }

        // level fight cases
//		diamondCount = 0;
        switch (Fight)
        {
        case 0:
            if (diamondCount >= diamondValue)
            {
                diamondCount = diamondCount - diamondValue;
                PlayerPrefs.SetInt("DIAMOND", diamondCount);
                if (level == 3)
                {
                    characterUpgradeValue = 23;
                    level3buygadha        = true;
                }
                else if (level == 2)
                {
                    characterUpgradeValue = 14;
                    level2buygadha        = true;
                }
                else
                {
                    characterUpgradeValue = 0;
                    buygadha1             = true;
                }
                this.characterUpgrade();
            }
            else
            {
                UFE.HideScreen(UFE.currentScreen);
                UFE.alertUI(0f);
            }
            break;

        case 1:
            if (diamondCount >= diamondValue)
            {
                diamondCount = diamondCount - diamondValue;
                PlayerPrefs.SetInt("DIAMOND", diamondCount);
                if (level == 3)
                {
                    characterUpgradeValue = 24;
                    level3buygadha2       = true;
                }
                else if (level == 2)
                {
                    characterUpgradeValue = 15;
                    level2buyarmour       = true;
                }
                else
                {
                    characterUpgradeValue = 6;
                    buygadha2             = true;
                }
                this.characterUpgrade();
            }
            else
            {
                UFE.HideScreen(UFE.currentScreen);
                UFE.alertUI(0f);
            }
            break;

        case 2:
            if (diamondCount >= diamondValue)
            {
                diamondCount = diamondCount - diamondValue;
                PlayerPrefs.SetInt("DIAMOND", diamondCount);
                if (level == 3)
                {
                    characterUpgradeValue = 22;
                    level3buyarmour       = true;
                }
                else if (level == 2)
                {
                    characterUpgradeValue = 16;
                    level2buygadha2       = true;
                }
                else
                {
                    characterUpgradeValue = 7;
                    buyArmour1            = true;
                }
                this.characterUpgrade();
            }
            else
            {
                UFE.HideScreen(UFE.currentScreen);
                UFE.alertUI(0f);
            }
            break;

        case 3:
            if (diamondCount >= diamondValue)
            {
                diamondCount = diamondCount - diamondValue;
                PlayerPrefs.SetInt("DIAMOND", diamondCount);
                if (level == 3)
                {
                }
                else if (level == 2)
                {
                    characterUpgradeValue = 17;
                    level2buyarmour2      = true;
                }
                else
                {
                    characterUpgradeValue = 8;
                    buygadha3             = true;
                }
                this.characterUpgrade();
            }
            else
            {
                UFE.HideScreen(UFE.currentScreen);
                UFE.alertUI(0f);
            }
            break;

        case 4:
            if (diamondCount >= diamondValue)
            {
                diamondCount = diamondCount - diamondValue;
                PlayerPrefs.SetInt("DIAMOND", diamondCount);
                if (level == 3)
                {
                }
                else if (level == 2)
                {
                    characterUpgradeValue = 25;
                    level2buyarmour3      = true;
                }
                else
                {
                    characterUpgradeValue = 9;
                    buyArmour2            = true;
                }
                this.characterUpgrade();
            }
            else
            {
                UFE.HideScreen(UFE.currentScreen);
                UFE.alertUI(0f);
            }
            break;
        }
    }
Пример #10
0
    public void gadhaANDcoins()
    {
        Fight = PlayerPrefs.GetInt("FIGHTTAG");
        int coinsCount = PlayerPrefs.GetInt("COINSI");

        btn = GameObject.FindGameObjectWithTag("CoinsTag");
        btn.GetComponent <Button>().interactable = false;
        string Value = btn.transform.GetChild(0).GetComponent <UnityEngine.UI.Text> ().text;

        coinValue = int.Parse(Value);
        string level_fgt = PlayerPrefs.GetString("LEVEL");

        if (level_fgt.Equals("LEVELI"))
        {
            level = 1;
        }
        else if (level_fgt.Equals("LEVELII"))
        {
            level = 2;
        }
        coinsCount = 100;
        switch (Fight)
        {
        case 0:
            if (coinsCount >= coinValue)
            {
                PlayVideo();
            }
            else
            {
                UFE.HideScreen(UFE.currentScreen);
                UFE.waitUI(0f);
            }
            break;

        case 1:
            if (coinsCount >= coinValue)
            {
                PlayVideo();
            }
            else
            {
                UFE.HideScreen(UFE.currentScreen);
                UFE.waitUI(0f);
            }
            break;

        case 2:
            if (coinsCount >= coinValue)
            {
                PlayVideo();
            }
            else
            {
                UFE.HideScreen(UFE.currentScreen);
                UFE.waitUI(0f);
            }
            break;

        case 3:
            if (coinsCount >= coinValue)
            {
                PlayVideo();
            }
            else
            {
                UFE.HideScreen(UFE.currentScreen);
                UFE.waitUI(0f);
            }
            break;

        case 4:
            if (coinsCount >= coinValue)
            {
                PlayVideo();
            }
            else
            {
                UFE.HideScreen(UFE.currentScreen);
                UFE.waitUI(0f);
            }
            break;
        }
    }
Пример #11
0
 public void buyDiamonds()
 {
     UFE.HideScreen(UFE.currentScreen);
     UFE.storeUI(0f);
 }
Пример #12
0
 public void wait()
 {
     UFE.HideScreen(UFE.currentScreen);
     PlayerPrefs.SetString("WaitScene", "UFE_WAIT");
     UFE.timerUI(0f);
 }