Esempio n. 1
0
    IEnumerator PlayAudio(AudioClip audioClip, string buttonName)
    {
        audio.volume = Properties.sfxVolume;
        audio.PlayOneShot(audioClip);
        yield return(new WaitForSeconds(audioClip.length));

        switch (buttonName)
        {
        case "Back":
            if (Properties.CurrentScene == "MainGame")
            {
                WorkAround.LoadLevelWorkaround("ExitScene");
            }
            else
            {
                WorkAround.LoadLevelWorkaround(Properties.ParentScene);
            }
            break;

        case "Settings":
            WorkAround.LoadLevelWorkaround("SettingsScene");
            break;

        case "Audio":
            WorkAround.LoadLevelWorkaround("Options");
            break;
        }
    }
Esempio n. 2
0
    IEnumerator PlayAudio(AudioClip audioClip, string buttonName)
    {
        audio.volume = Properties.sfxVolume;
        audio.PlayOneShot(audioClip);
        yield return(new WaitForSeconds(audioClip.length));

        switch (buttonName)
        {
        case "Play":
            Properties.SelectedDenomination = selectedDenomination;
            if (Properties.GamePlayBalance != 0)
            {
                Debug.Log(Properties.GamePlayBalance);
                Properties.S_GoingtoPlay    = true;
                Properties.GamePlayBalance -= Properties.SelectedDenomination;
                WorkAround.LoadLevelWorkaround("Airhockey");
            }
            else
            {
                Properties.ParentScene = "ChallengesScene";
                WorkAround.LoadLevelWorkaround("Airhockey");
            }
            break;

        case "Custom":
            WorkAround.LoadLevelWorkaround("CustomizeBetScene");
            break;
        }
    }
Esempio n. 3
0
    IEnumerator PlayAudio(AudioClip audioClip, string buttonName)
    {
        audio.volume = Properties.sfxVolume;
        audio.PlayOneShot(audioClip);
        yield return(new WaitForSeconds(audioClip.length));

        switch (buttonName)
        {
        case "Help":
            WorkAround.LoadLevelWorkaround("help");
            break;

        case "Options":
            WorkAround.LoadLevelWorkaround("Options");
            break;

        case "Back":
            WorkAround.LoadLevelWorkaround("ModesScene");
            break;

        case "Select":
            Challenge.Select_flag = true;
            break;
        }
    }
Esempio n. 4
0
    IEnumerator PlayAudio(AudioClip audioClip, string buttonName)
    {
        audio.volume = Properties.sfxVolume;
        audio.PlayOneShot(audioClip);
        yield return(new WaitForSeconds(audioClip.length));

        switch (buttonName)
        {
        case "Back":
            WorkAround.LoadLevelWorkaround("ChallengesScene");
            break;

        case "Help":
            Properties.PreviousScene = "ScoreScene";
            WorkAround.LoadLevelWorkaround("Help");
            break;

        case "Options":
            Properties.PreviousScene = "ScoreScene";
            WorkAround.LoadLevelWorkaround("Options");
            break;

        case "PlayAgain":
            Properties.GameType = Properties.Modes.PlayforFun;
            WorkAround.LoadLevelWorkaround("Airhockey");
            break;

        case "MainMenu":
            WorkAround.LoadLevelWorkaround("ModesScene");
            break;
        }
    }
Esempio n. 5
0
    IEnumerator PlayAudio(AudioClip audioClip, string buttonName)
    {
        audio.volume = Properties.sfxVolume;
        audio.PlayOneShot(audioClip);
        yield return(new WaitForSeconds(audioClip.length));

        switch (buttonName)
        {
        case "Back":
            WorkAround.LoadLevelWorkaround(Properties.PreviousScene);
            break;

        case "Help":
//			WorkAround.LoadLevelWorkaround(Properties.PreviousScene);
            break;

        case "LogOut":
//				WorkAround.LoadLevelWorkaround(Properties.PreviousScene);
            break;

        case "Quit":
//				WorkAround.LoadLevelWorkaround(Properties.PreviousScene);
            break;
        }
    }
Esempio n. 6
0
    IEnumerator PlayAudio(AudioClip audioClip, string buttonName)
    {
        audio.volume = Properties.sfxVolume;
        audio.PlayOneShot(audioClip);
        yield return(new WaitForSeconds(audioClip.length));

        switch (buttonName)
        {
        case "PlayForCash":
            break;

        case "PlayForFun":
            WorkAround.LoadLevelWorkaround("MainMenu");
            break;

        case "Help":
            WorkAround.LoadLevelWorkaround("Options");
            break;

        case "Settings":
            WorkAround.LoadLevelWorkaround("Settings");
            break;

        case "Back":

            break;

        case "LeaderBoard":
            WorkAround.LoadLevelWorkaround("LeaderBoard");
            break;
        }
    }
Esempio n. 7
0
    void OnGUI()
    {
        GUI.depth = 0;

        GUI.DrawTexture(bSpotRect, BSpot);
        GUI.DrawTexture(logoRect, Logo);

        if (GUI.Button(Return, "", style))
        {
            StartCoroutine(PlayAudio(ReturnClick, "Back"));
        }
        if (GUI.Button(podiumRect, "", podiumStyle))
        {
            StartCoroutine(PlayAudio(CommonClick, "LeaderBoard"));
        }
        if (!showpopup)
        {
            if (GUI.Button(playForFunRect, "", PlayForFunStyle))
            {
                StartCoroutine(PlayAudio(CommonClick, "PlayForFun"));
                Properties.GameType      = Properties.Modes.PlayforFun;
                Properties.ChallengeMode = "";
            }
            if (GUI.Button(playForCashRect, "", PlayForMoneyStyle))
            {
                Properties.GameType = Properties.Modes.PlayforMoney;
                StartCoroutine(PlayAudio(CommonClick, "PlayForCash"));
                //if (!Properties.IsLoggedIn)
                //{
                //    Application.OpenURL(BasicHandShake.loginUrl + "?successUrl=" + BasicHandShake.thisPage + "&apiKey=" + BasicHandShake.apiKey);
                //    Debug.Log("testing this: " + (BasicHandShake.loginUrl + "?successUrl=" + BasicHandShake.thisPage + "&apiKey=" + BasicHandShake.apiKey));
                //}
                //else
                {
                    WorkAround.LoadLevelWorkaround("ChallengesScene");
                }
            }
        }

        if (GUI.Button(optionsRect, "", optionsStyle))
        {
            StartCoroutine(PlayAudio(CommonClick, "Help"));
        }

        if (GUI.Button(helpRect, "", helpStyle))
        {
            StartCoroutine(PlayAudio(CommonClick, "Settings"));
        }

        if (showpopup)
        {
            GUI.DrawTexture(Popuprect, PopupLogo);
            if (GUI.Button(OkRect, "", OkStyle))
            {
                showpopup = false;
            }
        }
    }
Esempio n. 8
0
 IEnumerator BSpotSplash()
 {
     while (bspotFader >= 0f)
     {
         bspotFader -= Time.deltaTime;
         yield return(null);
     }
     WorkAround.LoadLevelWorkaround("ModesScene");
     //StartCoroutine (TikiSplashFadeIn());
 }
Esempio n. 9
0
 IEnumerator BowlingSplashFadeOut()
 {
     while (shuffleBowlingFader >= 0f)
     {
         shuffleBowlingFader -= Time.deltaTime * 0.5f;
         yield return(null);
     }
     // start new scene.
     WorkAround.LoadLevelWorkaround("ModesScene");
     Debug.Log("i did not hit this");
 }
Esempio n. 10
0
    IEnumerator PlayAudio(AudioClip audioClip, string buttonName)
    {
        audio.volume = Properties.sfxVolume;
        audio.PlayOneShot(audioClip);
        yield return(new WaitForSeconds(audioClip.length));

        switch (buttonName)
        {
        case "OK":
            WorkAround.LoadLevelWorkaround("ChallengesScene");
            break;
        }
    }
Esempio n. 11
0
 void OnGUI()
 {
     if (GUI.Button(new Rect(20, 40, 200, 20), "Single Player"))
     {
         gamePropertiesScript.GameType = "SINGLEPLAYER";
         WorkAround.LoadLevelWorkaround("Airhockey");
     }
     if (GUI.Button(new Rect(20, 80, 200, 20), "Multi Player"))
     {
         gamePropertiesScript.GameType = "MULTIPLAYER";
         WorkAround.LoadLevelWorkaround("Airhockey");
     }
 }
Esempio n. 12
0
    IEnumerator PlayAudio(AudioClip audioClip, string buttonName)
    {
        audio.volume = Properties.sfxVolume;
        audio.PlayOneShot(audioClip);
        yield return(new WaitForSeconds(audioClip.length));

        switch (buttonName)
        {
        case "Help":
            Properties.PreviousScene = "UnLockChallenge";
            WorkAround.LoadLevelWorkaround("Help");
            break;

        case "Options":
            Properties.PreviousScene = "UnLockChallenge";
            WorkAround.LoadLevelWorkaround("Options");
            break;

        case "PlayAnotherChallenge":
            WorkAround.LoadLevelWorkaround("ChallengesScene");
            break;

        case "UnLockChallenge":
            var challengeProperties = Properties.winLoseDictionary[Properties.ChallengeMode];
            int unLockAmount        = challengeProperties.UnLockAmount;
            if (unLockAmount <= Properties.TotalTickets)
            {
                PlayerPrefsX.SetBool(Properties.winLoseDictionary[Properties.ChallengeMode].Name, true);

                Properties.TotalTickets -= unLockAmount;

                PlayerPrefs.SetInt("Total Tickets", (int)Properties.TotalTickets);

                PlayerPrefs.Save();
                //show unlockedScreen
                //texture = challengeUnLockedTexture;
                challengeUnlocked = true;
                StartCoroutine("ChangeScreen");
//					WorkAround.LoadLevelWorkaround("UnLockedChallenge");
            }

            else
            {
                Properties.MoreTickets = unLockAmount - (int)Properties.TotalTickets;
                WorkAround.LoadLevelWorkaround("MoreTickets");
            }
            break;
        }
    }
Esempio n. 13
0
    IEnumerator PlayAudio(AudioClip audioClip, string buttonName)
    {
        audio.volume = Properties.sfxVolume;
        audio.PlayOneShot(audioClip);
        yield return(new WaitForSeconds(audioClip.length));

        switch (buttonName)
        {
        case "Play":
            Properties.S_GoingtoPlay    = true;
            Properties.GamePlayBalance -= Properties.SelectedDenomination;
            WorkAround.LoadLevelWorkaround("Airhockey");
            break;
        }
    }
Esempio n. 14
0
    IEnumerator PlayAudio(AudioClip audioClip, string buttonName)
    {
        audio.volume = Properties.sfxVolume;
        audio.PlayOneShot(audioClip);
        yield return(new WaitForSeconds(audioClip.length));

        switch (buttonName)
        {
        case "Help":
            Properties.PreviousScene = "Airhockey";
            WorkAround.LoadLevelWorkaround("Help");
            break;

        case "Options":
            Properties.PreviousScene = "Airhockey";
            WorkAround.LoadLevelWorkaround("Options");
            break;

        case "Back":
            break;

        case "Win":
            isWinTexure                        = true;
            Properties.GameWonState            = "Win";
            BasicHandShake.GamePlayReveal_flag = true;
            if (Properties.GameType == Properties.Modes.PlayforMoney)
            {
                UpdateTickets();
            }
            StartCoroutine(ResultsWait());
            break;

        case "Lose":
            Properties.GameWonState = "Lose";
            if (Properties.GameType == Properties.Modes.PlayforMoney)
            {
                UpdateTickets();
            }
            WorkAround.LoadLevelWorkaround("Results");
            break;

        case "Ok":
            Properties.isPopUpShown = false;
            WorkAround.LoadLevelWorkaround(Properties.ParentScene);
            break;
        }
    }
Esempio n. 15
0
 void OnGUI()
 {
     if (GUI.Button(yesRect, "", yesStyle))
     {
         if (Properties.GameType == Properties.Modes.PlayforFun)
         {
             WorkAround.LoadLevelWorkaround("ModesScene");
         }
         else
         {
             WorkAround.LoadLevelWorkaround("ChallengesScene");
         }
     }
     if (GUI.Button(noRect, "", noStyle))
     {
         WorkAround.LoadLevelWorkaround(Properties.PreviousScene);
     }
 }
Esempio n. 16
0
 void OnGUI()
 {
     GUI.depth = 0;
     if (GUI.Button(GreatBritianRect, GreatBritian, textStyle))
     {
         Properties.countries = Properties.Countries.GreatBritian;
         WorkAround.LoadLevelWorkaround("Airhockey");
     }
     if (GUI.Button(GermanyRect, Germany, textStyle))
     {
         Properties.countries = Properties.Countries.Germany;
         WorkAround.LoadLevelWorkaround("Airhockey");
     }
     if (GUI.Button(USARect, USA, textStyle))
     {
         Properties.countries = Properties.Countries.USA;
         WorkAround.LoadLevelWorkaround("Airhockey");
     }
     if (GUI.Button(CzechRect, Czech, textStyle))
     {
         Properties.countries = Properties.Countries.CzechRepublic;
         WorkAround.LoadLevelWorkaround("Airhockey");
     }
     if (GUI.Button(FinlandRect, Finland, textStyle))
     {
         Properties.countries = Properties.Countries.Finland;
         WorkAround.LoadLevelWorkaround("Airhockey");
     }
     if (GUI.Button(RussiaRect, Russia, textStyle))
     {
         Properties.countries = Properties.Countries.Russia;
         WorkAround.LoadLevelWorkaround("Airhockey");
     }
     if (GUI.Button(CanadaRect, Canada, textStyle))
     {
         Properties.countries = Properties.Countries.Canada;
         WorkAround.LoadLevelWorkaround("Airhockey");
     }
     if (GUI.Button(SwedenRect, Sweden, textStyle))
     {
         Properties.countries = Properties.Countries.Sweden;
         WorkAround.LoadLevelWorkaround("Airhockey");
     }
 }
Esempio n. 17
0
 void FixedUpdate()
 {
     if (Properties.IsLogoTransitionsAllowed && !Properties.IsLoggedIn)
     {
         time += Time.deltaTime;
         if (time > 2f && isFade)
         {
             StartCoroutine(BSpotSplash());
             isFade = false;
         }
     }
     else if (!Properties.IsLogoTransitionsAllowed && Properties.IsLoggedIn)
     {
         Debug.Log("transitions are completed:");
         Properties.GameType = Properties.Modes.PlayforMoney;
         WorkAround.LoadLevelWorkaround("ChallengesScene");
         Debug.Log("going to enter the modesscene");
     }
 }
Esempio n. 18
0
    void OnGUI()
    {
        GUI.DrawTexture(BGRect, BG);
        GUI.DrawTexture(hudRect, hud);
        GUI.DrawTexture(frameRect, frame);
        GUI.DrawTexture(challengeTitleRect, challengeTitle);
        GUI.DrawTexture(challengeInfoRect, challengeInfo);
        GUI.DrawTexture(buyTicketsRect, buyTickets);

        if (GUI.Button(backsRect, "", backsStyle))
        {
            WorkAround.LoadLevelWorkaround("ChallengesScene");
        }
        if (GUI.Button(optionsRect, "", optionsStyle))
        {
            Properties.PreviousScene = "UnLockedChallenge";
            WorkAround.LoadLevelWorkaround("Options");
        }
        if (GUI.Button(helpRect, "", helpStyle))
        {
            Properties.PreviousScene = "UnLockedChallenge";
            WorkAround.LoadLevelWorkaround("Help");
        }
        if (GUI.Button(storeRect, "", storeStyle))
        {
        }

        GUI.DrawTexture(bspotRect, bspotLoggedIn);
        GUI.DrawTexture(gameplayBalRect, gameplayBal);
        GUI.DrawTexture(cashBalRect, cashBal);
        GUI.Label(gameplayBalValueRect, Properties.GamePlayBalance.ToString(), balanceStyle);
        GUI.Label(cashBalValueRect, Properties.CashBalance.ToString(), balanceStyle);

        //		GUI.Label (ticketsRect, "Tickets :"+Properties.TotalTickets, style2);
        //		GUI.Label (gameplayRect, "GamePlay: $"+Properties.GamePlayBalance, style2);
        //
        //		GUI.Label (labelRect, "Challenge Screen", style);
        //		GUI.Label (ticketsLabelRect, ""+Properties.MoreTickets, style1);
        //		GUI.DrawTexture (textureRect,texture);
        //		if (GUI.Button (returnTextureRect, returnTexture)) {
        //			WorkAround.LoadLevelWorkaround("ChallengesScene");
        //		}
    }
Esempio n. 19
0
    IEnumerator PlayAudio(AudioClip audioClip, string buttonName)
    {
        audio.volume = Properties.sfxVolume;
        audio.PlayOneShot(audioClip);
        yield return(new WaitForSeconds(audioClip.length));

        switch (buttonName)
        {
        case "Back":
            WorkAround.LoadLevelWorkaround(Properties.PreviousScene);
            break;

        case "Fun":

            break;

        case "Money":

            break;

        case "SetUp":

            break;

        case "Tournament":

            break;

        case "Arcade":

            break;

        case "FAQ":

            break;

        case "Contact":

            break;
        }
    }
    IEnumerator PlayAudio(AudioClip audioClip, string buttonName)
    {
        audio.volume = Properties.sfxVolume;
        audio.PlayOneShot(audioClip);
        yield return(new WaitForSeconds(audioClip.length));

        switch (buttonName)
        {
        case "Help":
            WorkAround.LoadLevelWorkaround("help");
            break;

        case "Sound":
            WorkAround.LoadLevelWorkaround("Options");
            break;

        case "Back":
            WorkAround.LoadLevelWorkaround(Properties.ParentScene);
            break;
        }
    }
Esempio n. 21
0
//	TODO Add the Audio functionality
    IEnumerator PlayAudio(AudioClip audioClip, string buttonName)
    {
        audio.volume = Properties.sfxVolume;
        audio.PlayOneShot(audioClip);
        yield return(new WaitForSeconds(audioClip.length));

        switch (buttonName)
        {
        case "Back":
            WorkAround.LoadLevelWorkaround(Properties.PreviousScene);
            break;

        case "Tournament":
            Properties.PlayMode = Properties.PlayForFunMode.TOURNAMENT;
            WorkAround.LoadLevelWorkaround("Countries");
            break;

        case "Arcade":
            Properties.PlayMode = Properties.PlayForFunMode.ARCADE;
            WorkAround.LoadLevelWorkaround("Countries");
            break;
        }
    }
Esempio n. 22
0
    void OnGUI()
    {
        GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), bg);
        GUI.DrawTexture(new Rect(0, 0, frame.width, frame.height), frame);

        if (GUI.Button(playOfflineRect, playOffline, buttonStyle))
        {
            //Application.OpenURL("https://sb.oddz.com/cas/login?service=https://s3.amazonaws.com/testtiki/webbuild.html");
            Properties.ParentScene = "Login";
            WorkAround.LoadLevelWorkaround("ModesScene");
        }

        if (GUI.Button(facebookRect, "", facebookStyle))
        {
        }

        if (GUI.Button(eMailRect, "", eMailStyle))
        {
        }

        if (GUI.Button(twitterRect, "", twitterStyle))
        {
        }
    }
Esempio n. 23
0
    // Update is called once per frame
    // No Ai on challenges 1, 6, 7 and 9
    void Update()
    {
        switch (gameMode)
        {
        case Properties.Modes.PlayforFun:

            //CheckEndOfFrames();
            if (Properties.HumanplayerGoals == 7 && Properties.HumanplayerGoals > Properties.AIPlayerGoals)
            {
                Properties.HumanplayerGoals = 0;
                Properties.AIPlayerGoals    = 0;
                if (Properties.PlayMode == Properties.PlayForFunMode.ARCADE)
                {
                    //this.YouWin();
                    StartCoroutine(PlayAudio(ChallengeWin_audio[0], "Win"));
                }
                else if (Properties.PlayMode == Properties.PlayForFunMode.TOURNAMENT)
                {
                    Properties.Rounds++;
                    if (Properties.Rounds > 2)
                    {
                        Properties.HumanplayerGoals = 0;
                        Properties.AIPlayerGoals    = 0;
                        Properties.Rounds           = 0;
                        Properties.TempCountries.Clear();
                        WorkAround.LoadLevelWorkaround("LeaderBoard");
                    }
                    else
                    {
                        Properties.HumanplayerGoals = 0;
                        Properties.AIPlayerGoals    = 0;
                        WorkAround.LoadLevelWorkaround("ladder");
                    }
                }
            }
            else if (Properties.AIPlayerGoals > Properties.HumanplayerGoals && Properties.AIPlayerGoals == 7)
            {
                Properties.HumanplayerGoals = 0;
                Properties.AIPlayerGoals    = 0;
                Properties.Rounds           = 0;
                this.YouLose();
            }
            break;

        case Properties.Modes.PlayforMoney:
            switch (challengeMode)
            {
            case "Bank Shot":
                Aiplayer.gameObject.SetActive(false);
                this.bankshot();
                break;

            case "Shutout":
                Currenttime = System.DateTime.Now;
                System.TimeSpan span = Currenttime.Subtract(Actualtime);
                if (span.Minutes >= 5)
                {
                    this.shutout();
                }
                else if (Properties.AIPlayerGoals > 0)
                {
                    Properties.AIPlayerGoals = 0;
                    this.UpdateAttempts();
                }
                break;

            case "Defender":
                this.defender();
                break;

            case "The Wall":
                this.thewall();
                break;

            case "Hat Trick":
                this.hattrick();
                break;

            case "Penalty Shot":
                Aiplayer.rigidbody.velocity = Vector3.zero;
                this.penaltyshot();
                break;

            case "Ricochet Champ":
                Aiplayer.gameObject.SetActive(false);
                this.ricochetchamp();
                break;

            case "Destroyer":
                this.destroyer();
                break;

            case "Off the Boards":
                Aiplayer.gameObject.SetActive(false);
                this.offtheboards();
                break;

            case "The Great Wall":
                this.thegreatwall();
                break;
            }
            break;
        }
    }
Esempio n. 24
0
    public IEnumerator ShowScoreScene()
    {
        yield return(new WaitForSeconds(1f));

        WorkAround.LoadLevelWorkaround("ScoreScene");
    }
Esempio n. 25
0
    //float timeOut = 0;

    IEnumerator ResultsWait()
    {
        yield return(new WaitForSeconds(1f));

        WorkAround.LoadLevelWorkaround("Results");
    }
Esempio n. 26
0
    //float timeElapsed = 0f;


    IEnumerator ChallengeSceneWait()
    {
        yield return(new WaitForSeconds(1.8f));

        WorkAround.LoadLevelWorkaround("ChallengesScene");
    }
Esempio n. 27
0
    void OnGUI()
    {
        if (!Properties.isPopUpShown)
        {
            GUI.depth = 1;

            GUI.BeginGroup(new Rect(transform.position.x, transform.position.y, challengeBG.width, challengeBG.height));

            Vector2 sizeOfLabel;

            if (isLocked)
            {
                if (GUI.Button(new Rect(challengeRect.width / 2 - lockTextureRect.width / 2,
                                        challengeRect.height / 2 - lockTextureRect.height / 2,
                                        lockTextureRect.width, lockTextureRect.height), lockTexture, style) || Select_flag)
                {
                    Select_flag = false;
                    Properties.ChallengeMode = Properties.challengeDictionary [challengeName];

                    Properties.SelectedChallenge = name;

                    if (Properties.TotalTickets >= unLockTickets)
                    {
                        PlayerPrefsX.SetBool(Properties.winLoseDictionary[Properties.ChallengeMode].Name, false);

                        Properties.TotalTickets -= unLockTickets;

                        PlayerPrefs.SetInt("Total Tickets", (int)Properties.TotalTickets);

                        PlayerPrefs.Save();

                        isLocked = false;

                        //pinPositionScript.isLocked = isLocked;

                        //WorkAround.LoadLevelWorkaround ("UnLockChallenge");
                    }
                    else
                    {
                        WorkAround.LoadLevelWorkaround("TicketsNeeded");
                    }
                }

                GUI.Button(challengeRect, challengeBG, style);

                label_unlock = unLockTickets + " b TICKETS TO UNLOCK";
                sizeOfLabel  = style.CalcSize(new GUIContent(label_unlock));
                label1       = new Rect(0, 0, challengeRect.width, challengeRect.height);

                GUI.Label(label1, label_unlock, unlockStyle);
            }
            else
            {
                if (GUI.Button(challengeRect, challengeBG, style) || Select_flag)
                {
                    Select_flag = false;
                    Properties.isChallengeFinished = false;
                    Properties.ChallengeMode       = Properties.challengeDictionary [challengeName];
                    Properties.TotalAttempts       = Properties.winLoseDictionary[Properties.ChallengeMode].Attempts;
                    Properties.SelectedChallenge   = challengeNumber;
                    WorkAround.LoadLevelWorkaround("WagerScene");
                }

//				//title of the challenge
//				sizeOfLabel = style.CalcSize (new GUIContent (challengeNumber));
//				label1 = new Rect(challengeRect.width/2 - sizeOfLabel.x/2, 5, sizeOfLabel.x, sizeOfLabel.y);
//				GUI.Label(label1, challengeNumber, style);
//
//				//description of the challenge
//				sizeOfLabel = style.CalcSize (new GUIContent (challengeName));
//				label2 = new Rect(30,65,width,height);
//				GUI.Label(label2, challengeName, style);

                GUI.DrawTexture(challengeNameRect, challengeNameTexture);

                GUI.DrawTexture(challengeDescRect, challengeDescTexture);

                GUI.DrawTexture(ChallengeImageRect, ChallengeImage);
            }

            GUI.EndGroup();

            //GUI.DrawTexture(challengeNumberRect, challengeNumberTexture);

            GUI.DrawTexture(ticketsAngledRect, ticketsAngledTexure);

            if (!isLocked)
            {
                GUI.DrawTexture(attemptsTextureRect, attemptsTexture);

                sizeOfLabel = style.CalcSize(new GUIContent(attempts.ToString()));
                GUI.Label(new Rect(attemptsTextureRect.xMax + 20, attemptsTextureRect.yMax - sizeOfLabel.y, sizeOfLabel.x, sizeOfLabel.y), attempts.ToString(), attemptStyle);
            }
        }
    }