Esempio n. 1
0
    public void SetupGameplay()
    {
        m_referenceImage = m_gameplay.ReferenceImage;
        var initialColor  = m_referenceImage.Colors[0];
        var imageProgress = m_gameplay.ImageProgress;

        m_boardInputController.BoardTileTapped += HandleBoardTileTapped;

        m_hud.Init(m_referenceImage.Colors);
        m_hud.SetPaleteButtonColor(initialColor);
        m_hud.PreviewPressed         += HandlePreviewPressed;
        m_hud.PreviewReleased        += HandlePreviewReleased;
        m_hud.PaletteClicked         += HandlePaletteClicked;
        m_hud.PauseClicked           += HandlePauseClicked;
        m_hud.CheatFillColorsClicked += HandleCheatFillColorsClicked;

        m_board.PreviewEnded += HandleBoardPreviewEnded;
        m_board.SetReferenceImage(m_referenceImage.Texture);
        m_board.SetSize(imageProgress.Width, imageProgress.Height);
        m_board.SetTiles(m_gameplay.ImageProgress.GetTiles());
        m_board.HidePreview();

        m_hud.m_palette.ColorClicked += HandleColorClicked;
        m_hud.m_palette.SetActiveColor(initialColor);
        m_hud.m_tileProgress.SetMax(m_gameplay.ImageProgress.TotalTiles);
        m_hud.m_tileProgress.SetCurrent(m_gameplay.ImageProgress.RevealedTiles);
        m_hud.m_cheatRevealImage.gameObject.SetActive(GameSettings.DevBuild);

        m_hud.m_palette.PaletteShown  += PaletteShown;
        m_hud.m_palette.PaletteClosed += PaletteClosed;

        m_pauseView.ResumeClicked     += HandlePauseViewResumeClicked;
        m_pauseView.BackToMenuClicked += HandlePauseViewBackToMenuClicked;
        m_pauseView.OptionsClicked    += HandlePauseViewOptionsClicked;
        m_pauseView.Hide();

        m_summaryView.BackToMenuClicked += HandleBackToMenuClicked;
        m_summaryView.Hide();

        m_summaryController = new SummaryController(m_board, m_summaryView, m_gameplay, m_boardInputController);

        m_bonusController = new BonusController();
        m_bonusController.Init(m_gameplay, m_bonusView, m_hud);

        m_tutorialView.Hide();
        if (m_gameplay.IsTutorialImage)
        {
            m_tutorial = new TutorialController();
            m_tutorial.Init(m_tutorialView, this);
        }

        var imageViewData = LevelsScene.CreateImageViewData(m_referenceImage, m_gameplay.BundleId);

        m_boardInputController.PauseInput();
        m_board.SetScale(Vector2.zero, m_board.MinScale);
        m_board.SetLocalPosition(Vector2.zero);
        m_levelIntroView.Finished += HandleLevelIntroViewFinished;
        m_levelIntroView.Show(imageViewData);
    }
Esempio n. 2
0
    private void Awake()
    {
        if (!Instance)
        {
            Instance = this;
        }

        DickType dickType = (DickType)PlayerPrefs.GetInt("racistDifficulty", 0);
        DickInfo info     = dickSettings[dickType];

        skinColor  = dickMaterials[info.material_ind];
        dickRadius = info.thickness;
        if (PlayerPrefs.GetInt("tutorial", 0) == 0)
        {
            tutorialController.Init();
        }
    }
Esempio n. 3
0
        private IEnumerator LoadAsync()
        {
            yield return(LoadScene());

            LoadMenu();
            AssignMenu();

            musicSystem.Init();

            chordProgressGrid = Instantiate(chordProgressGridPrefab);
            chordEditorController.Init(chordLibraryUiPrefab, chordEditorPrefab, musicSystem);
            tutorialController.Init();

            AssignControlPanelControls();
            AssignMusicSystemControls();
            chordEditorController.PointerPosChanged.AddListener(pos => musicSystem.StartBlock = pos);
        }
Esempio n. 4
0
        private IEnumerator LoadAsync()
        {
            yield return(LoadScene());

            LoadMenu();
            AssignMenu();

            musicSystem.Init();
            ghostPlayMusicSystem.Init();

            extendedControlPanel = Instantiate(extendedControlPanelPrefab);
            noteEditorController.Init();

            AssignControlPanelControls();
            AssignMusicSystemControls();
            noteEditorController.PointerPosChanged.AddListener(pos => musicSystem.StartBlock = pos);

            tutorialController.Init();
        }
    private IEnumerator GameInit()
    {
        chartEle   = SetChartDifficlty(StaticValue.difficulty);
        gaugeRule  = (int)StaticValue.gaugeRule;
        noteSpeed  = StaticValue.noteSpeed;
        judgeStyle = StaticValue.judgeStyle;
        System.Array.Resize(ref uiData.judgeCount, timingRange[(int)judgeStyle].judges.Length);

        ChartStruct chart = musicStruct.charts[chartEle];

        timeController.Init(chart);
        tutorialController.Init(isTutorial);
        // 各コントローラーの初期化処理を非同期で行う
        yield return(StartCoroutine(notesController.GenerateNotes(gaugeStructs.gaugeRules[gaugeRule], chart, laneObjs)));

        yield return(StartCoroutine(measureController.Init(chart, laneObjsParent)));

        yield return(StartCoroutine(inputController.Init(laneObjs.Length)));

        yield return(StartCoroutine(starCountroller.Init()));

        yield return(StartCoroutine(particleController.Init()));

        yield return(StartCoroutine(LoadAudioData(musicStruct.musicFileName, loadName)));

        RenderSettings.skybox = backGroundData.backGroundMaterials[(int)musicStruct.backGroundType];

        notesController.UpdateManage(noteSpeed);
        measureController.MoveMeasure(noteSpeed, chart);

        // ScoreCountの計算
        uiData.maxScoreCount   = notesController.totalCombo * timingRange[(int)judgeStyle].judges[(int)JudgeType.Just].scoreCount;
        uiData.totalGaugeCount = notesController.totalGaugeCount;
        uiData.noteSpeed       = noteSpeed;
        uiData.bpm             = chart.bpm;
        uiData.gaugePer        = gaugeStructs.gaugeRules[gaugeRule].startPar;

        growAnim.SetFloat("Speed", chart.bpm / 120);

        musicSource.volume = musicStruct.musicVolume;

        uiCountroller.Init(
            uiData: uiData,
            gaugeRule: gaugeStructs.gaugeRules[gaugeRule],
            trackCount: StaticValue.trackCount,
            musicName: musicStruct.musicName,
            artistName: musicStruct.composer,
            difficulty: chart.difficulty,
            level: chart.level,
            timeLength: Clac.TimeByTimingCount(
                count: chart.chartLength,
                oneBeatCount: Clac.OneBeatCount(chart.beat, chart.beatParam),
                musicOffset: chart.musicOffset,
                bpm: chart.bpm,
                tempoChanger: chart.tempoChangers),
            isDemo: isDemoPlay,
            isTutorial: isTutorial
            );

        yield return(null);

        System.GC.Collect();
        yield return(null);

        isInitFinish = true;

        cookpitUIAnim.SetBool("Show", true);

        if (isDemoPlay || isTutorial)
        {
            // デモプレイ、チュートリアルはすぐに始める
            cookpitUIAnim.SetTrigger("NonAnim");
            isStarting = true;
        }
        else
        {
            keyInfoAnim.SetBool("KeyShow", true);
            yield return(new WaitForSeconds(1.0f));
        }
    }