예제 #1
0
    IEnumerator AnimCroutine(float waitTime)
    {
        isAnim = false;
        backButtonImage.SetActive(false);
        yield return(new WaitForSeconds(waitTime));

        if (isNormal && !isHardUnlock)
        {
            hardLockImage.GetComponent <Animator>().SetBool("isAnim", true);
            StageDate.SetBool(StageDate.hardUnlockKey, true);
            yield return(new WaitForSeconds(2.4f));

            DrawChange();
            yield return(new WaitForSeconds(0.5f));
        }


        if (isHard && !isExtraUnlock)
        {
            exLockImage.GetComponent <Animator>().SetBool("isAnim", true);
            StageDate.SetBool(StageDate.extraUnlockKey, true);
            yield return(new WaitForSeconds(2.4f));

            DrawChange();
            yield return(new WaitForSeconds(0.5f));
        }

        backButtonImage.SetActive(true);
        Select();
        isAnim = true;
    }
예제 #2
0
 void Awake()
 {
     isDelete = StageDate.GetBool(StageDate.deleteKey, false);
     if (!isDelete)
     {
         PlayerPrefs.DeleteAll();
         StageDate.SetBool(StageDate.deleteKey, true);
     }
 }
예제 #3
0
    // Update is called once per frame
    void Update()
    {
        float value;

        if (float.TryParse(inputField.text, out value))
        {
            if (value > maxValue)
            {
                inputField.text = preValue + "";
            }
            else
            {
                preValue = value;
            }
        }

        Name();
        SelectMove();
        if (isInput)
        {
            SelectKey();
        }

        if ((Input.GetKey(KeyCode.Space) || Input.GetButtonDown("Jump")) && !isPush && !isInput)
        {
            isPush = true;
            audio.PlayOneShot(selectSE);
            RankingScene.sceneNum = 0;
            if (selectNum == 0)
            {
                icon.gameObject.SetActive(true);
                for (int i = 0; i < keys.Count; i++)
                {
                    keys[i].SetActive(true);
                }
                isInput = true;
            }
            else if (selectNum == 1)
            {
                StageDate.SetBool(StageDate.clearKey, true);
                StageClearBool();
                QuickRanking.Instance.SaveRanking(nameText.text, stageName, (int)goalscore);
                fade.StartFadeIn(rankingName, true);
            }
            else
            {
                StageDate.SetBool(StageDate.clearKey, true);
                StageClearBool();
                QuickRanking.Instance.SaveRanking(nameText.text, stageName, (int)goalscore);
                fade.StartFadeIn("Title", true);
            }
        }
    }
예제 #4
0
 void SelectKey()
 {
     if ((Input.GetButtonDown("Jump")))
     {
         if (icon.GetComponent <Icon>().GetText() != null)
         {
             if (icon.GetComponent <Icon>().keyObj != null)
             {
                 icon.GetComponent <Icon>().keyObj.GetComponent <KeyAction>().Push();
             }
             keyText = icon.GetComponent <Icon>().GetText();
             if (keyText == "DELETE")
             {
                 inputField.text = "";
                 keyCnt          = 0;
             }
             else if (keyText == "ENTER")
             {
                 if (icon.GetComponent <Icon>().keyObj != null)
                 {
                     icon.GetComponent <Icon>().keyObj.GetComponent <KeyAction>().Reset();
                 }
                 keyCnt = 0;
                 for (int i = 0; i < keys.Count; i++)
                 {
                     keys[i].SetActive(false);
                 }
                 icon.gameObject.SetActive(false);
                 StageDate.SetBool(StageDate.clearKey, true);
                 StageClearBool();
                 QuickRanking.Instance.SaveRanking(nameText.text, stageName, (int)goalscore);
                 fade.StartFadeIn(rankingName, true);
             }
             else
             {
                 if (keyCnt <= maxValue)
                 {
                     inputField.text += keyText;
                     keyCnt++;
                 }
             }
         }
     }
 }
예제 #5
0
    public void Delete()
    {
        if (pushCnt == 0)
        {
            PlayerPrefs.DeleteAll();
        }
        else if (pushCnt == 1)
        {
            StageDate.SetBool(StageDate.clearKey, true);
            StageDate.SetBool(StageDate.normalKey, true);
        }
        else if (pushCnt == 2)
        {
            StageDate.SetBool(StageDate.hardKey, true);
        }
        else
        {
            StageDate.SetBool(StageDate.extraKey, true);
        }

        pushCnt += 1;
    }
예제 #6
0
 void StageClearBool()
 {
     StageDate.Instance.SetSceneName(stageName);
     if (stageName == "StageEasy")
     {
         StageDate.SetBool(StageDate.easyKey, true);
         rankingName = "RankingEasy";
     }
     else if (stageName == "StageNormal")
     {
         StageDate.SetBool(StageDate.normalKey, true);
         rankingName = "RankingNormal";
     }
     else if (stageName == "StageHard")
     {
         StageDate.SetBool(StageDate.hardKey, true);
         rankingName = "RankingHard";
     }
     else
     {
         StageDate.SetBool(StageDate.extraKey, true);
         rankingName = "RankingExtra";
     }
 }