Merge pull request #5 from evgen-app/startQuestPlot

add first scene
This commit is contained in:
Ilia vasilenko 2022-01-30 14:11:59 +03:00 committed by GitHub
commit d56055b13c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1965 additions and 7 deletions

File diff suppressed because it is too large Load Diff

View File

@ -10,6 +10,7 @@ public class AudioPlayer : MonoBehaviour
private bool _play;
void Awake()
{
Debug.Log("fuck you");
_audioPlayer = gameObject.GetComponent<AudioSource>();
_stopsCommits = new List<AudioPlayerStopsCommit>();
}

View File

@ -18,10 +18,7 @@ public static class DialogData{
"Подробности высланы вам на почту, проверьте",
Roles.CAPTAIN,
Resources.Load<AudioClip>("audio/капитан/подробности высланы")
)
};
public static DialogDataClass[] SecondSceneFirstAction = {
),
new DialogDataClass(
"Файл доставлен, в нем обнаружены повреждения",
Roles.VOICE_ASSISTANT,
@ -33,6 +30,10 @@ public static class DialogData{
Resources.Load<AudioClip>("audio/пилот/о черт, опять этот баг")
)
};
public static DialogDataClass[] SecondSceneFirstAction = {
};
public static DialogDataClass[] SecondSceneSecondAction = {
new DialogDataClass(
"В этот раз файл поврежден очень сильно, надо его открыть и посмотреть что в нем сохранилось",

View File

@ -15,6 +15,10 @@ public class DialogPlayer : MonoBehaviour
int _idx = 0;
Replica _currentReplica;
bool _isDialogPlaying = true;
bool getIsDialogPlaying(){
return _isDialogPlaying;
}
void changeDialogData(DialogDataClass[] dialogData){
_dialogData = dialogData;
@ -69,7 +73,9 @@ public class DialogPlayer : MonoBehaviour
// Update is called once per frame
void Update()
{
if (_idx >= _dialogData.Length-1) return;
if (_idx >= _dialogData.Length-1) {
_isDialogPlaying = false;
}
if (_currentReplica.getIsEnded()) {
_idx++;
_currentReplica = createReplica();