Beispiel #1
0
 public void SetAskingCubeObject(AskingCubeBoxScript ask = null)
 {
     askingCube = ask;
 }
Beispiel #2
0
 public void SetAskingCubeBoxFunction(AskingCubeBoxScript askingCubeBox)
 {
     askingCubeBoxScript = askingCubeBox;
 }
    //Function : CheckTheCurrentStatementToZeroFunction
    //Method : This is the Function used
    //For Checking The Current Statement To Zero
    private void CheckTheCurrentStatementToZeroFunction()
    {
        if (GameManager.instance.lvl1UnlockEnemiesCount.Count <= 0)
        {
            if (instanEnemyBoxCollider.isStage1)
            {
                instanEnemyBoxCollider.Unlocked = true;

                UIManager.instance.GetGoldenCostTextFunction().text = "Golden Has To Cost :" + instanEnemyBoxCollider.GoldenCost.ToString();



                if (PlayerManagerScript.instance.Gold >= instanEnemyBoxCollider.GoldenCost)
                {
                    UIManager.instance.GetYesButtonFunction().interactable = true;
                    UIManager.instance.GetNoButtonFunction().interactable  = true;
                }
                else if (PlayerManagerScript.instance.Gold < instanEnemyBoxCollider.GoldenCost)
                {
                    UIManager.instance.GetYesButtonFunction().interactable = false;
                    UIManager.instance.GetNoButtonFunction().interactable  = true;
                }
            }


            // SelectedScoopScript.instance.SetAskingCubeObject(askingCube);
        }

        if (GameManager.instance.lvl2UnlockEnemiesCount.Count <= 0)
        {
            if (instanEnemyBoxCollider.isStage2)
            {
                instanEnemyBoxCollider.Unlocked = true;

                UIManager.instance.GetGoldenCostTextFunction().text = "Golden Has To Cost :" + instanEnemyBoxCollider.GoldenCost.ToString();



                if (PlayerManagerScript.instance.Gold >= instanEnemyBoxCollider.GoldenCost)
                {
                    UIManager.instance.GetYesButtonFunction().interactable = true;
                    UIManager.instance.GetNoButtonFunction().interactable  = true;
                }
                else if (PlayerManagerScript.instance.Gold < instanEnemyBoxCollider.GoldenCost)
                {
                    UIManager.instance.GetYesButtonFunction().interactable = false;
                    UIManager.instance.GetNoButtonFunction().interactable  = true;
                }
            }
            //    instanEnemyBoxCollider.SetAskingCubeBoxFunction(askingCube);
        }

        if (GameManager.instance.lvl3UnlockEnemiesCount.Count <= 0)
        {
            if (instanEnemyBoxCollider.isStage3)
            {
                instanEnemyBoxCollider.Unlocked = true;

                UIManager.instance.GetGoldenCostTextFunction().text = "Golden Has To Cost :" + instanEnemyBoxCollider.GoldenCost.ToString();



                if (PlayerManagerScript.instance.Gold >= instanEnemyBoxCollider.GoldenCost)
                {
                    UIManager.instance.GetYesButtonFunction().interactable = true;
                    UIManager.instance.GetNoButtonFunction().interactable  = true;
                }
                else if (PlayerManagerScript.instance.Gold < instanEnemyBoxCollider.GoldenCost)
                {
                    UIManager.instance.GetYesButtonFunction().interactable = false;
                    UIManager.instance.GetNoButtonFunction().interactable  = true;
                }
            }
        }

        if (GameManager.instance.lvl4UnlockEnemyCount.Count <= 0)
        {
            if (instanEnemyBoxCollider.isStage4)
            {
                instanEnemyBoxCollider.Unlocked = true;

                UIManager.instance.GetGoldenCostTextFunction().text = "Golden Has To Cost :" + instanEnemyBoxCollider.GoldenCost.ToString();



                if (PlayerManagerScript.instance.Gold >= instanEnemyBoxCollider.GoldenCost)
                {
                    UIManager.instance.GetYesButtonFunction().interactable = true;
                    UIManager.instance.GetNoButtonFunction().interactable  = true;
                }
                else if (PlayerManagerScript.instance.Gold < instanEnemyBoxCollider.GoldenCost)
                {
                    UIManager.instance.GetYesButtonFunction().interactable = false;
                    UIManager.instance.GetNoButtonFunction().interactable  = true;
                }
            }
        }

        if (GameManager.instance.lvl5UnlockEnemyCount.Count <= 0)
        {
            if (instanEnemyBoxCollider.isStage5)
            {
                instanEnemyBoxCollider.Unlocked = true;
                UIManager.instance.GetGoldenCostTextFunction().text = "Golden Has To Cost :" + instanEnemyBoxCollider.GoldenCost.ToString();



                if (PlayerManagerScript.instance.Gold >= instanEnemyBoxCollider.GoldenCost)
                {
                    UIManager.instance.GetYesButtonFunction().interactable = true;
                    UIManager.instance.GetNoButtonFunction().interactable  = true;
                }
                else if (PlayerManagerScript.instance.Gold < instanEnemyBoxCollider.GoldenCost)
                {
                    UIManager.instance.GetYesButtonFunction().interactable = false;
                    UIManager.instance.GetNoButtonFunction().interactable  = true;
                }
            }
        }

        if (GameManager.instance.lvl6UnlockEnemyCount.Count <= 0)
        {
            if (instanEnemyBoxCollider.isStage6)
            {
                instanEnemyBoxCollider.Unlocked = true;
                UIManager.instance.GetGoldenCostTextFunction().text = "Golden Has To Cost :" + instanEnemyBoxCollider.GoldenCost.ToString();



                if (PlayerManagerScript.instance.Gold >= instanEnemyBoxCollider.GoldenCost)
                {
                    UIManager.instance.GetYesButtonFunction().interactable = true;
                    UIManager.instance.GetNoButtonFunction().interactable  = true;
                }
                else if (PlayerManagerScript.instance.Gold < instanEnemyBoxCollider.GoldenCost)
                {
                    UIManager.instance.GetYesButtonFunction().interactable = false;
                    UIManager.instance.GetNoButtonFunction().interactable  = true;
                }
            }
        }

        if (GameManager.instance.lvl7UnlockEnemyCount.Count <= 0)
        {
            if (instanEnemyBoxCollider.isStage7)
            {
                instanEnemyBoxCollider.Unlocked = true;
                UIManager.instance.GetGoldenCostTextFunction().text = "Golden Has To Cost :" + instanEnemyBoxCollider.GoldenCost.ToString();



                if (PlayerManagerScript.instance.Gold >= instanEnemyBoxCollider.GoldenCost)
                {
                    UIManager.instance.GetYesButtonFunction().interactable = true;
                    UIManager.instance.GetNoButtonFunction().interactable  = true;
                }
                else if (PlayerManagerScript.instance.Gold < instanEnemyBoxCollider.GoldenCost)
                {
                    UIManager.instance.GetYesButtonFunction().interactable = false;
                    UIManager.instance.GetNoButtonFunction().interactable  = true;
                }
            }
        }

        if (GameManager.instance.lvl9UnlockEnemyCount.Count <= 0)
        {
            instanEnemyBoxCollider.Unlocked = true;
            UIManager.instance.GetGoldenCostTextFunction().text = "Golden Has To Cost :" + instanEnemyBoxCollider.GoldenCost.ToString();



            if (PlayerManagerScript.instance.Gold >= instanEnemyBoxCollider.GoldenCost)
            {
                UIManager.instance.GetYesButtonFunction().interactable = true;
                UIManager.instance.GetNoButtonFunction().interactable  = true;
            }
            else if (PlayerManagerScript.instance.Gold < instanEnemyBoxCollider.GoldenCost)
            {
                UIManager.instance.GetYesButtonFunction().interactable = false;
                UIManager.instance.GetNoButtonFunction().interactable  = true;
            }
        }

        if (GameManager.instance.lvl10UnlockEnemyCount.Count <= 0)
        {
            instanEnemyBoxCollider.Unlocked = true;
            UIManager.instance.GetGoldenCostTextFunction().text = "Golden Has To Cost :" + instanEnemyBoxCollider.GoldenCost.ToString();



            if (PlayerManagerScript.instance.Gold >= instanEnemyBoxCollider.GoldenCost)
            {
                UIManager.instance.GetYesButtonFunction().interactable = true;
                UIManager.instance.GetNoButtonFunction().interactable  = true;
            }
            else if (PlayerManagerScript.instance.Gold < instanEnemyBoxCollider.GoldenCost)
            {
                UIManager.instance.GetYesButtonFunction().interactable = false;
                UIManager.instance.GetNoButtonFunction().interactable  = true;
            }
        }

        if (GameManager.instance.lvl11UnlockEnemyCount.Count <= 0)
        {
            instanEnemyBoxCollider.Unlocked = true;
            UIManager.instance.GetGoldenCostTextFunction().text = "Golden Has To Cost :" + instanEnemyBoxCollider.GoldenCost.ToString();



            if (PlayerManagerScript.instance.Gold >= instanEnemyBoxCollider.GoldenCost)
            {
                UIManager.instance.GetYesButtonFunction().interactable = true;
                UIManager.instance.GetNoButtonFunction().interactable  = true;
            }
            else if (PlayerManagerScript.instance.Gold < instanEnemyBoxCollider.GoldenCost)
            {
                UIManager.instance.GetYesButtonFunction().interactable = false;
                UIManager.instance.GetNoButtonFunction().interactable  = true;
            }
        }

        if (GameManager.instance.lvl12UnlockEnemyCount.Count <= 0)
        {
            instanEnemyBoxCollider.Unlocked = true;
            UIManager.instance.GetGoldenCostTextFunction().text = "Golden Has To Cost :" + instanEnemyBoxCollider.GoldenCost.ToString();

            if (PlayerManagerScript.instance.Gold >= instanEnemyBoxCollider.GoldenCost)
            {
                UIManager.instance.GetYesButtonFunction().interactable = true;
                UIManager.instance.GetNoButtonFunction().interactable  = true;
            }

            else if (PlayerManagerScript.instance.Gold < instanEnemyBoxCollider.GoldenCost)
            {
                UIManager.instance.GetYesButtonFunction().interactable = false;
                UIManager.instance.GetNoButtonFunction().interactable  = true;
            }
        }

        if (GameManager.instance.lvl14UnlockEnemyCount.Count <= 0)
        {
            instanEnemyBoxCollider.Unlocked = true;
            UIManager.instance.GetGoldenCostTextFunction().text = "Golden Has To Cost :" + instanEnemyBoxCollider.GoldenCost.ToString();

            if (PlayerManagerScript.instance.Gold >= instanEnemyBoxCollider.GoldenCost)
            {
                UIManager.instance.GetYesButtonFunction().interactable = true;
                UIManager.instance.GetNoButtonFunction().interactable  = true;
            }

            else if (PlayerManagerScript.instance.Gold < instanEnemyBoxCollider.GoldenCost)
            {
                UIManager.instance.GetYesButtonFunction().interactable = false;
                UIManager.instance.GetNoButtonFunction().interactable  = true;
            }
        }

        if (GameManager.instance.lvl15UnlockEnemyCount.Count <= 0)
        {
            instanEnemyBoxCollider.Unlocked = true;
            UIManager.instance.GetGoldenCostTextFunction().text = "Golden Has To Cost :" + instanEnemyBoxCollider.GoldenCost.ToString();

            if (PlayerManagerScript.instance.Gold >= instanEnemyBoxCollider.GoldenCost)
            {
                UIManager.instance.GetYesButtonFunction().interactable = true;
                UIManager.instance.GetNoButtonFunction().interactable  = true;
            }

            else if (PlayerManagerScript.instance.Gold < instanEnemyBoxCollider.GoldenCost)
            {
                UIManager.instance.GetYesButtonFunction().interactable = false;
                UIManager.instance.GetNoButtonFunction().interactable  = true;
            }
        }

        if (GameManager.instance.lvl16UnlockEnemyCount.Count <= 0)
        {
            instanEnemyBoxCollider.Unlocked = true;
            UIManager.instance.GetGoldenCostTextFunction().text = "Golden Has To Cost :" + instanEnemyBoxCollider.GoldenCost.ToString();

            if (PlayerManagerScript.instance.Gold >= instanEnemyBoxCollider.GoldenCost)
            {
                UIManager.instance.GetYesButtonFunction().interactable = true;
                UIManager.instance.GetNoButtonFunction().interactable  = true;
            }

            else if (PlayerManagerScript.instance.Gold < instanEnemyBoxCollider.GoldenCost)
            {
                UIManager.instance.GetYesButtonFunction().interactable = false;
                UIManager.instance.GetNoButtonFunction().interactable  = true;
            }
        }

        if (GameManager.instance.lvl17UnlockEnemyCount.Count <= 0)
        {
            instanEnemyBoxCollider.Unlocked = true;
            UIManager.instance.GetGoldenCostTextFunction().text = "Golden Has To Cost :" + instanEnemyBoxCollider.GoldenCost.ToString();

            if (PlayerManagerScript.instance.Gold >= instanEnemyBoxCollider.GoldenCost)
            {
                UIManager.instance.GetYesButtonFunction().interactable = true;
                UIManager.instance.GetNoButtonFunction().interactable  = true;
            }

            else if (PlayerManagerScript.instance.Gold < instanEnemyBoxCollider.GoldenCost)
            {
                UIManager.instance.GetYesButtonFunction().interactable = false;
                UIManager.instance.GetNoButtonFunction().interactable  = true;
            }
        }

        if (GameManager.instance.lvl18UnlockEnemyCount.Count <= 0)
        {
            instanEnemyBoxCollider.Unlocked = true;
            UIManager.instance.GetGoldenCostTextFunction().text = "Golden Has To Cost :" + instanEnemyBoxCollider.GoldenCost.ToString();

            if (PlayerManagerScript.instance.Gold >= instanEnemyBoxCollider.GoldenCost)
            {
                UIManager.instance.GetYesButtonFunction().interactable = true;
                UIManager.instance.GetNoButtonFunction().interactable  = true;
            }

            else if (PlayerManagerScript.instance.Gold < instanEnemyBoxCollider.GoldenCost)
            {
                UIManager.instance.GetYesButtonFunction().interactable = false;
                UIManager.instance.GetNoButtonFunction().interactable  = true;
            }
        }



        if (instanEnemyBoxCollider.Unlocked)
        {
            GameObject          InstanCubeBox = Instantiate(InstanAskingCubeBoxObjects, new Vector3(instanEnemyBoxCollider.transform.position.x, 2.38f, instanEnemyBoxCollider.transform.position.z), Quaternion.identity);
            AskingCubeBoxScript askingCube    = InstanCubeBox.GetComponent <AskingCubeBoxScript>();

            SelectedScoopScript.instance.SetAskingCubeObject(askingCube);
        }
    }