//-------------------------------------------------------------------- // ● 初期化 //-------------------------------------------------------------------- void Start() { audio = GetComponent <AudioSource>(); ex_pixel = GameObject.FindWithTag("ExPixel_Changer") .GetComponent <ExPixel_Changer>(); StartCoroutine(moviePlay(movie_name)); }
public static Voice_Manager voice; // 声 //-------------------------------------------------------------------- // ● 初期化(早) //-------------------------------------------------------------------- void Awake() { // スピーカーが生成されていない場合 if (!speaker) { // 音発生用スピーカーを作成し、ゲーム内に配置 speaker = new GameObject("Audio_Speaker"); ex_pixel = GameObject.FindWithTag("ExPixel_Changer") .GetComponent <ExPixel_Changer>(); // カメラ位置に合わせる speaker.transform.position = get_camera_position(); DontDestroyOnLoad(speaker); // シーン切り替え後も保存 // 各種管理クラスを作成 bgm = new BGM_Manager(); // BGM bgs = new BGS_Manager(); // BGS me = new ME_Manager(); // ME se = new SE_Manager(); // SE voice = new Voice_Manager(); // 声 } }