Menu基本完成

This commit is contained in:
SoulliesOfficial
2025-06-14 14:42:49 -04:00
parent b9e6a9ab25
commit b19469976a
52 changed files with 1380 additions and 363 deletions

View File

@@ -29,6 +29,7 @@ namespace Ichni.Story.UI
button.onClick.AddListener(() =>
{
MenuManager.instance.prepareUIPage.SetUpPrepareUIPage(songName);
MenuManager.instance.prepareUIPage.FadeIn();
});
@@ -44,7 +45,7 @@ namespace Ichni.Story.UI
{
SongStatusSave songStatusSave = GameSaveManager.instance.SongSaveModule.songStatusSaves[songName];
string chapter = StoryManager.instance.currentChapter;
string chapter = ChapterSelectionManager.instance.currentChapter;
ChapterSelectionUnit cpt = ChapterSelectionManager.instance.chapters.First(c => c.chapterIndex == chapter);
SongItemData song = cpt.songs.First(s => s.songName == this.songName);
foreach (DifficultyData difficulty in song.difficultyDataList)

View File

@@ -28,7 +28,7 @@ namespace Ichni.Story.UI
int cIndex = index; // Capture the current index for the listener
GameObject choiceButton = Instantiate(choiceButtonPrefab, container);
choiceButton.GetComponentInChildren<Localize>().SetTerm(StoryManager.instance.currentChapter + "/" + choice.choiceText);
choiceButton.GetComponentInChildren<Localize>().SetTerm(ChapterSelectionManager.instance.currentChapter + "/" + choice.choiceText);
choiceButton.GetComponent<Button>().onClick.AddListener(() =>
{
DialogManager.instance.PlayNextDialogParagraph(choice.nextDialogName);

View File

@@ -27,7 +27,7 @@ namespace Ichni.Story
{
DialogTextUI dialogTextUI = Instantiate(textPrefab, dialogContentContainer).GetComponent<DialogTextUI>();
dialogTextUI.speakerNameText.SetTerm("Characters/" + speakerName);
dialogTextUI.contentText.SetTerm(StoryManager.instance.currentChapter +"/" +content);
dialogTextUI.contentText.SetTerm(ChapterSelectionManager.instance.currentChapter +"/" +content);
dialogTexts.Add(dialogTextUI);
}

View File

@@ -1,8 +1,9 @@
using System.Collections;
using System.Collections.Generic;
using Ichni.UI;
using UnityEngine;
namespace Ichni.UI
namespace Ichni.Story.UI
{
public class StoryUIPage : UIPageBase
{

View File

@@ -43,7 +43,7 @@ namespace Ichni.Story.UI
//TutorialBlockUI t0 = GenerateTutorialBlock(new Vector2(200, -400), "ZakoCurse 0");
//TextBlockUI b1 = GenerateTextBlock("Departure_P1_A", new Vector2(1000, -400), StoryBlockState.Current);
SetUpStoryline(StoryManager.instance.currentChapter);
SetUpStoryline(ChapterSelectionManager.instance.currentChapter);
/*GenerateTextBlock("Departure_P1_A", new Vector2(1000, -400), StoryBlockState.Current);
GenerateTextBlock("Departure_P2_A", new Vector2(1500, -400), StoryBlockState.Current);
@@ -60,7 +60,7 @@ namespace Ichni.Story.UI
public TutorialBlockUI GenerateTutorialBlock(string blockName, Vector2 position, StoryBlockState state)
{
TutorialBlockUI block = Instantiate(tutorialBlockPrefab, content).GetComponent<TutorialBlockUI>();
StoryData storyData = StoryManager.instance.storyDatas[StoryManager.instance.currentChapter];
StoryData storyData = StoryManager.instance.storyDatas[ChapterSelectionManager.instance.currentChapter];
TutorialBlockData blockData = storyData.tutorialBlockDatas.FirstOrDefault(data => data.blockName == blockName);
if (blockData == null) throw new KeyNotFoundException("There is no block with name " + blockName);
@@ -76,7 +76,7 @@ namespace Ichni.Story.UI
public DialogBlockUI GenerateDialogBlock(string blockName, Vector2 position, StoryBlockState state)
{
DialogBlockUI block = Instantiate(dialogBlockPrefab, content).GetComponent<DialogBlockUI>();
StoryData storyData = StoryManager.instance.storyDatas[StoryManager.instance.currentChapter];
StoryData storyData = StoryManager.instance.storyDatas[ChapterSelectionManager.instance.currentChapter];
DialogBlockData blockData = storyData.dialogBlockDatas.FirstOrDefault(data => data.blockName == blockName);
if (blockData == null) throw new KeyNotFoundException("There is no block with name " + blockName);
@@ -92,7 +92,7 @@ namespace Ichni.Story.UI
public SongBlockUI GenerateSongBlock(string blockName, Vector2 position, StoryBlockState state)
{
SongBlockUI block = Instantiate(musicBlockPrefab, content).GetComponent<SongBlockUI>();
StoryData storyData = StoryManager.instance.storyDatas[StoryManager.instance.currentChapter];
StoryData storyData = StoryManager.instance.storyDatas[ChapterSelectionManager.instance.currentChapter];
SongBlockData blockData = storyData.songBlockDatas.FirstOrDefault(data => data.blockName == blockName);
if (blockData == null) throw new KeyNotFoundException("There is no block with name " + blockName);
@@ -243,7 +243,7 @@ namespace Ichni.Story.UI
{
ClearStoryline();
StoryData storyData = StoryManager.instance.storyDatas[StoryManager.instance.currentChapter];
StoryData storyData = StoryManager.instance.storyDatas[ChapterSelectionManager.instance.currentChapter];
List<InitialBlockData> initialBlocks = storyData.initialBlocks;
foreach (InitialBlockData blockData in initialBlocks)
@@ -273,7 +273,7 @@ namespace Ichni.Story.UI
}
SetUpBackground();
SaveStoryline(StoryManager.instance.currentChapter);
SaveStoryline(ChapterSelectionManager.instance.currentChapter);
}
}
}