Menu基本完成
This commit is contained in:
@@ -41,7 +41,7 @@ namespace Ichni.Story
|
||||
|
||||
public void SetDialog(string dialogName)
|
||||
{
|
||||
string chapter = StoryManager.instance.currentChapter;
|
||||
string chapter = ChapterSelectionManager.instance.currentChapter;
|
||||
TextAsset dialog = Resources.Load<TextAsset>("Story/" + chapter + "/Dialogs/" + dialogName);
|
||||
SetDialog(new List<TextAsset> { dialog });
|
||||
}
|
||||
|
||||
@@ -14,8 +14,7 @@ namespace Ichni.Story
|
||||
|
||||
[FormerlySerializedAs("storylineDisplay")] public Storyline storyline;
|
||||
public StoryUIPage storyUIPage;
|
||||
|
||||
public string currentChapter;
|
||||
|
||||
public Dictionary<string, StoryData> storyDatas;
|
||||
|
||||
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.Story
|
||||
{
|
||||
public class StoryBlockSave
|
||||
{
|
||||
public string blockName;
|
||||
public Vector2 position;
|
||||
public StoryBlockState state;
|
||||
|
||||
public StoryBlockSave(string blockName, Vector2 position, StoryBlockState state)
|
||||
{
|
||||
this.blockName = blockName;
|
||||
this.state = state;
|
||||
this.position = position;
|
||||
}
|
||||
}
|
||||
|
||||
public class TutorialBlockSave : StoryBlockSave
|
||||
{
|
||||
public TutorialBlockSave(string blockName, Vector2 position, StoryBlockState state) : base(blockName, position, state)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class DialogBlockSave : StoryBlockSave
|
||||
{
|
||||
public DialogBlockSave(string blockName, Vector2 position, StoryBlockState state) : base(blockName, position, state)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class SongBlockSave : StoryBlockSave
|
||||
{
|
||||
public SongBlockSave(string blockName, Vector2 position, StoryBlockState state) : base(blockName, position, state)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class BlockConnectorSave
|
||||
{
|
||||
public string startBlockName;
|
||||
public string endBlockName;
|
||||
|
||||
public BlockConnectorSave(string startBlockName, string endBlockName)
|
||||
{
|
||||
this.startBlockName = startBlockName;
|
||||
this.endBlockName = endBlockName;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9ff8f51d49d96524fab4c38c7f846368
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user