Exemplo n.º 1
0
    public void Update()
    {
        if (!hasSaved)
        {
            return;
        }
        if (!hasBeed)
        {
            PD.SetupSound();
            PD.sounds.SetVoiceAndPlay(SoundPaths.A_BEEEEEE, 0);
            hasBeed = true;
        }
        int input = PD.ReturnLaunchOrPauseOrNothingIsPressed();

        if (--countdown < 0 || input > 0)
        {
            if (input != 2)
            {
                PD.ChangeScreen(PersistData.GS.OpeningScene);
            }
            else
            {
                PD.GoToMainMenu();
            }
        }
    }
Exemplo n.º 2
0
    private void UpdateMenu()
    {
        if (Input.GetKeyDown(KeyCode.End))
        {
            PD.ChangeScreen(PersistData.GS.Credits);
        }
        if (cursor.back())
        {
            PD.sounds.SetSoundAndPlay(SoundPaths.S_Menu_Deny); CleanupMenu(); return;
        }
        KonamiCodeCheck();
        HandleMouse();
        cursor.DoUpdate();
        int oldIdx = selectedIdx;
        int cY = cursor.getY(), cX = cursor.getX();

        if (cY == 0)
        {
            cX = 0;
        }
        selectedIdx = 8 - cY * 2 + cX;
        if (selectedIdx != oldIdx)
        {
            menuButtonHighlights[oldIdx].SetActive(false);
        }
        menuButtonHighlights[selectedIdx].SetActive(true);
        menuButtonHighlights[selectedIdx].GetComponent <SpriteRenderer>().color = new Color(1.0f, 1.0f, 1.0f, GetButtonOpacity());
        if (cursor.launchOrPause())
        {
            isTransitioning = true; ConfirmSelectionAndAdvance(selectedIdx);
        }
    }
Exemplo n.º 3
0
    public void Update()
    {
        if (--applauseTimer == 0)
        {
            PD.sounds.SetSoundAndPlay(SoundPaths.S_Applause + Random.Range(1, 7).ToString());
        }
        if (isOnline)
        {
            UpdateOnline();
            return;
        }
        if (PD.controller.G_Launch() || PD.controller.Pause() || clicker.isDown())
        {
            PD.sounds.SetSoundVolume(PD.GetSaveData().savedOptions["vol_s"] / 150.0f);
            if (PD.gameType == PersistData.GT.Versus)
            {
                PD.ChangeScreen(PersistData.GS.CharSel);
            }
            else
            {
                PD.ChangeScreen(PersistData.GS.HighScore);
            }
        }
        int pCount = particles.GetParticles(pars);

        for (int i = 0; i < pCount; i++)
        {
            if (Mathf.Abs(pars[i].startLifetime - pars[i].lifetime) < 0.05f)
            {
                pars[i].color = new Color(Random.Range(0.0f, 1.0f), Random.Range(0.0f, 1.0f), Random.Range(0.0f, 1.0f), 1.0f);
                pars[i].size *= Random.Range(0.8f, 1.2f);
            }
        }
        particles.SetParticles(pars, pCount);
    }
Exemplo n.º 4
0
 private void EndOnlineGame()
 {
     onlineState = -1;
     PD.ChangeScreen(PersistData.GS.CharSel);
     SteamNetworking.CloseP2PSessionWithUser((CSteamID)PD.onlineOpponentId);
     PD.onlineOpponentId = 0;
 }
Exemplo n.º 5
0
    private void ConfirmSelection()
    {
        if (GetLevelFromCursorPos() > levelCount)
        {
            return;
        }
        PD.sounds.SetSoundAndPlay(SoundPaths.S_Menu_Confirm);
        int level = GetLevelFromCursorPos();

        PD.SetPuzzleLevel(level);
        PD.p1Char = (PersistData.C)Random.Range(0, 11);
        XmlNode levelInfo = levelData[level];

        PD.rowCount  = System.Convert.ToInt32(levelInfo.SelectSingleNode("playerheight").InnerText);
        PD.rowCount2 = System.Convert.ToInt32(levelInfo.SelectSingleNode("botheight").InnerText);
        PD.ChangeScreen(PersistData.GS.Game);
    }
Exemplo n.º 6
0
 public void Update()
 {
     if (PD.p1Char == PersistData.C.FuckingBalloon)
     {
         return;
     }
     UpdateMouseInput();
     if (isUnlock)
     {
         if (unlockTimer-- > 0)
         {
             return;
         }
         if (clicker.isDown() || PD.controller.Pause() || PD.controller.G_Launch() || PD.controller.M_Confirm())
         {
             if (PD.gameType == PersistData.GT.Challenge)
             {
                 PD.ChangeScreen(PersistData.GS.PuzSel);
             }
             else
             {
                 PD.MoveFromWinScreen();
             }
         }
     }
     else
     {
         if (clicker.isDown() || PD.controller.Pause() || PD.controller.G_Launch() || PD.controller.M_Confirm())
         {
             if (PD.unlockNew > 0)
             {
                 SetUpUnlock(false);
             }
             else
             {
                 PD.MoveFromWinScreen();
             }
         }
     }
 }
Exemplo n.º 7
0
    private void AdvanceToGameOrCredits()
    {
        PD.sounds.SetSoundVolume(PD.GetSaveData().savedOptions["vol_s"] / 100.0f);
        bool isBossChar = PD.p1Char == PersistData.C.White || PD.p1Char == PersistData.C.September;

        if (!isBossChar && (PD.level == 6 || PD.level == 8))
        {
            if (PD.level == 6)
            {
                PD.winType = 1;
            }
            else
            {
                PD.winType = 2;
            }
            PD.ChangeScreen(PersistData.GS.Credits);
        }
        else
        {
            PD.ChangeScreen(PersistData.GS.Game);
        }
    }