Files
ichni_Official/Assets/Scripts/Menu/InformationTransistor.cs

52 lines
1.3 KiB
C#
Raw Normal View History

2025-06-03 02:42:28 -04:00
using System.Collections;
using System.Collections.Generic;
using AK.Wwise;
2025-07-21 05:42:20 -04:00
using Ichni.Menu;
2025-06-03 02:42:28 -04:00
using UnityEngine;
2025-07-21 05:42:20 -04:00
using UnityEngine.Serialization;
2025-06-03 02:42:28 -04:00
namespace Ichni
{
public class InformationTransistor : MonoBehaviour
{
public static InformationTransistor instance;
public bool isReturnedFromGame;
2025-09-06 21:58:48 -04:00
public bool isReturnedFromTutorial;
2025-07-21 05:42:20 -04:00
public ChapterSelectionUnit chapter;
public SongItemData song;
public DifficultyData difficulty;
2025-08-11 14:04:06 -04:00
public float songLength;
public float bpm;
2025-06-03 02:42:28 -04:00
public Switch chapterSwitch;
2025-07-21 05:42:20 -04:00
public Switch songSwitch;
2025-06-03 02:42:28 -04:00
2025-06-14 14:42:49 -04:00
private void Awake()
2025-06-03 02:42:28 -04:00
{
2025-06-14 14:42:49 -04:00
if (instance == null)
2025-06-03 02:42:28 -04:00
{
instance = this;
DontDestroyOnLoad(gameObject);
isReturnedFromGame = false;
2025-09-06 21:58:48 -04:00
isReturnedFromTutorial = false;
2025-06-03 02:42:28 -04:00
}
2025-06-14 14:42:49 -04:00
else
{
Destroy(gameObject);
}
2025-06-03 02:42:28 -04:00
}
2025-07-21 05:42:20 -04:00
public void SetInformation(ChapterSelectionUnit chapter,
SongItemData song, DifficultyData difficulty)
2025-06-03 02:42:28 -04:00
{
2025-07-21 05:42:20 -04:00
this.chapter = chapter;
this.song = song;
this.difficulty = difficulty;
this.chapterSwitch = chapter.chapterSwitch;
this.songSwitch = song.songSwitch;
2025-06-03 02:42:28 -04:00
}
}
}