SHADE_Y3/Assets/Scripts/UI/SC_CutsceneIntro.cs

675 lines
20 KiB
C#
Raw Normal View History

2023-02-27 15:33:58 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using SHADE;
2023-03-10 19:07:10 +08:00
using SHADE_Scripting.Audio;
2023-02-27 15:33:58 +08:00
2023-03-03 14:28:10 +08:00
public class CutsceneIntro : Script
2023-02-27 15:33:58 +08:00
{
2023-03-03 14:28:10 +08:00
public uint nextScene;
2023-02-27 15:33:58 +08:00
public float duration = 3.0f;
2023-03-03 14:28:10 +08:00
public float skipDuration = 0.1f;
2023-02-28 01:57:00 +08:00
private float oldDuration = 0.0f;
2023-02-27 15:33:58 +08:00
private Renderable pic1aRenderable;
private Renderable pic1bRenderable;
private Renderable pic1cRenderable;
2023-02-28 01:57:00 +08:00
private Renderable pic2aRenderable;
private Renderable pic2bRenderable;
private Renderable pic2cRenderable;
private Renderable pic3aRenderable;
private Renderable pic3bRenderable;
private Renderable pic3cRenderable;
private Renderable pic3dRenderable;
private Renderable pic3eRenderable;
2023-02-27 15:33:58 +08:00
private Transform pic1aTran;
private Transform pic1bTran;
private Transform pic1cTran;
2023-02-28 01:57:00 +08:00
private Transform pic2aTran;
private Transform pic2bTran;
private Transform pic2cTran;
private Transform pic3aTran;
private Transform pic3bTran;
private Transform pic3cTran;
private Transform pic3dTran;
private Transform pic3eTran;
2023-02-27 15:33:58 +08:00
2023-02-28 01:57:00 +08:00
private float alphaIn = 0.0f;
2023-02-27 15:33:58 +08:00
private float time = 0.0f;
private bool showPic1a = true;
private bool showPic1b = false;
private bool showPic1c = false;
2023-02-28 01:57:00 +08:00
private bool showPic2a = true;
private bool showPic2b = false;
private bool showPic2c = false;
private bool showPic3a = true;
private bool showPic3b = false;
private bool showPic3c = false;
private bool showPic3e = false;
private bool showPic3d = false;
private bool skip = false;
2023-02-27 15:33:58 +08:00
public GameObject cutscene1Points;
private List<Transform> listOfCutscene1Points;
public GameObject cutscene1Pics;
private List<Renderable> listOfCutscene1Pics;
2023-02-28 01:57:00 +08:00
public GameObject cutscene2Points;
private List<Transform> listOfCutscene2Points;
public GameObject cutscene2Pics;
private List<Renderable> listOfCutscene2Pics;
public GameObject cutscene3Points;
private List<Transform> listOfCutscene3Points;
public GameObject cutscene3Pics;
private List<Renderable> listOfCutscene3Pics;
private TextRenderable text1;
private TextRenderable text2;
private TextRenderable text3;
public GameObject canvas1;
public GameObject canvas2;
public GameObject canvas3;
private bool cutscene1Done = false;
private bool cutscene2Done = false;
private bool cutscene3Done = false;
2023-04-01 18:07:22 +08:00
public GameObject levelTransition;
private bool waiting = false;
2023-02-27 15:33:58 +08:00
protected override void awake()
2023-02-28 01:57:00 +08:00
{
initCutscene1();
initCutscene2();
initCutscene3();
2023-03-10 19:07:10 +08:00
//Cutscene BGM
AudioHandler.audioClipHandlers["cutsceneBGM"] = Audio.CreateAudioClip("event:/Cinematics/BGM");
AudioHandler.audioClipHandlers["cutscenePanelSlide"] = Audio.CreateAudioClip("event:/Cinematics/panel_slide");
//Cutscene 2 Audio
AudioHandler.audioClipHandlers["cutscene2Stomach"] = Audio.CreateAudioClip("event:/Cinematics/2/1_stomach");
AudioHandler.audioClipHandlers["cutscene2Alert"] = Audio.CreateAudioClip("event:/Cinematics/2/2_alert");
AudioHandler.audioClipHandlers["cutscene2Sparkle"] = Audio.CreateAudioClip("event:/Cinematics/2/3_sparkle");
//Cutscene 3 Audio
AudioHandler.audioClipHandlers["cutscene3Jump"] = Audio.CreateAudioClip("event:/Cinematics/3/1_jump");
AudioHandler.audioClipHandlers["cutscene3Sparkle"] = Audio.CreateAudioClip("event:/Cinematics/3/2_sparkle");
AudioHandler.audioClipHandlers["cutscene3Carry"] = Audio.CreateAudioClip("event:/Cinematics/3/3_carry");
AudioHandler.audioClipHandlers["cutscene3Throw"] = Audio.CreateAudioClip("event:/Cinematics/3/4_throw");
AudioHandler.audioClipHandlers["cutscene3Yay"] = Audio.CreateAudioClip("event:/Cinematics/3/5_yay");
AudioHandler.audioClipHandlers["cutsceneBGM"].Play();
2023-02-28 01:57:00 +08:00
}
protected override void update()
{
2023-04-01 18:07:22 +08:00
if (!levelTransition.GetScript<LevelTransistion>().complete)
return;
2023-02-28 01:57:00 +08:00
Canvas1();
Canvas2();
Canvas3();
if (Input.GetKeyUp(Input.KeyCode.Space) && !skip && (!cutscene1Done || !cutscene2Done || !cutscene3Done))
2023-02-28 01:57:00 +08:00
{
skip = true;
2023-03-10 19:07:10 +08:00
AudioHandler.audioClipHandlers["cutscene2Stomach"].Stop(true);
AudioHandler.audioClipHandlers["cutscene2Alert"].Stop(true);
AudioHandler.audioClipHandlers["cutscene2Sparkle"].Stop(true);
AudioHandler.audioClipHandlers["cutscene3Jump"].Stop(true);
AudioHandler.audioClipHandlers["cutscene3Sparkle"].Stop(true);
AudioHandler.audioClipHandlers["cutscene3Carry"].Stop(true);
AudioHandler.audioClipHandlers["cutscene3Throw"].Stop(true);
AudioHandler.audioClipHandlers["cutscene3Yay"].Stop(true);
AudioHandler.audioClipHandlers["cutscenePanelSlide"].Stop(true);
2023-02-28 01:57:00 +08:00
oldDuration = duration;
2023-03-03 14:28:10 +08:00
duration = skipDuration;
2023-02-28 01:57:00 +08:00
}
if (Input.GetKeyUp(Input.KeyCode.Space) && cutscene1Done && canvas1.IsActiveSelf)
2023-02-28 01:57:00 +08:00
{
canvas1.SetActive(false);
canvas2.SetActive(true);
duration = oldDuration;
skip = false;
}
if (Input.GetKeyUp(Input.KeyCode.Space) && cutscene2Done && canvas2.IsActiveSelf)
2023-02-28 01:57:00 +08:00
{
canvas2.SetActive(false);
canvas3.SetActive(true);
duration = oldDuration;
skip = false;
}
if (Input.GetKeyUp(Input.KeyCode.Space) && cutscene3Done && canvas3.IsActiveSelf)
2023-02-28 01:57:00 +08:00
{
2023-04-01 18:07:22 +08:00
levelTransition.GetScript<LevelTransistion>().resetToLeft();
waiting = true;
2023-02-28 01:57:00 +08:00
}
2023-04-01 18:07:22 +08:00
if (levelTransition.GetScript<LevelTransistion>().complete && waiting)
SceneManager.ChangeScene(nextScene);
2023-02-28 01:57:00 +08:00
}
private void Canvas1()
{
if (canvas1.IsActiveSelf)
{
2023-03-10 19:07:10 +08:00
if(time == 0 && !skip)
{
AudioHandler.audioClipHandlers["cutscenePanelSlide"].Play();
}
2023-02-28 01:57:00 +08:00
if (showPic1a)
{
if (time < duration)
{
pic1aTran.LocalPosition = Vector3.Lerp(pic1aTran.LocalPosition, listOfCutscene1Points[0].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic1aTran.LocalPosition = listOfCutscene1Points[0].LocalPosition;
alphaIn = 1.0f;
}
pic1aRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic1a = false;
showPic1b = true;
time = 0;
alphaIn = 0;
}
}
if (showPic1b)
{
2023-03-10 19:07:10 +08:00
if (time == 0 && !skip)
{
AudioHandler.audioClipHandlers["cutscenePanelSlide"].Play();
}
2023-02-28 01:57:00 +08:00
if (time < duration)
{
pic1bTran.LocalPosition = Vector3.Lerp(pic1bTran.LocalPosition, listOfCutscene1Points[1].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic1bTran.LocalPosition = listOfCutscene1Points[1].LocalPosition;
alphaIn = 1.0f;
}
pic1bRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic1b = false;
showPic1c = true;
time = 0;
alphaIn = 0;
}
}
if (showPic1c)
{
2023-03-10 19:07:10 +08:00
if (time == 0 && !skip)
{
AudioHandler.audioClipHandlers["cutscenePanelSlide"].Play();
}
2023-02-28 01:57:00 +08:00
if (time < duration)
{
pic1cTran.LocalPosition = Vector3.Lerp(pic1cTran.LocalPosition, listOfCutscene1Points[2].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic1cTran.LocalPosition = listOfCutscene1Points[2].LocalPosition;
alphaIn = 1.0f;
}
pic1cRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic1c = false;
cutscene1Done = true;
text1.Enabled = true;
time = 0;
alphaIn = 0;
}
}
}
}
private void Canvas2()
{
if (canvas2.IsActiveSelf)
{
if (showPic2a)
{
2023-03-10 19:07:10 +08:00
if (time == 0 && !skip)
{
AudioHandler.audioClipHandlers["cutscenePanelSlide"].Play();
AudioHandler.audioClipHandlers["cutscene2Stomach"].Play();
}
2023-02-28 01:57:00 +08:00
if (time < duration)
{
pic2aTran.LocalPosition = Vector3.Lerp(pic2aTran.LocalPosition, listOfCutscene2Points[0].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic2aTran.LocalPosition = listOfCutscene2Points[0].LocalPosition;
alphaIn = 1.0f;
}
pic2aRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic2a = false;
showPic2b = true;
time = 0;
alphaIn = 0;
}
}
if (showPic2b)
{
2023-03-10 19:07:10 +08:00
if(time == 0 && !skip)
{
AudioHandler.audioClipHandlers["cutscenePanelSlide"].Play();
AudioHandler.audioClipHandlers["cutscene2Alert"].Play();
}
2023-02-28 01:57:00 +08:00
if (time < duration)
{
pic2bTran.LocalPosition = Vector3.Lerp(pic2bTran.LocalPosition, listOfCutscene2Points[1].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic2bTran.LocalPosition = listOfCutscene2Points[1].LocalPosition;
alphaIn = 1.0f;
}
pic2bRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic2b = false;
showPic2c = true;
time = 0;
alphaIn = 0;
}
}
if (showPic2c)
{
2023-03-10 19:07:10 +08:00
if (time == 0 && !skip)
{
AudioHandler.audioClipHandlers["cutscenePanelSlide"].Play();
AudioHandler.audioClipHandlers["cutscene2Sparkle"].Play();
}
2023-02-28 01:57:00 +08:00
if (time < duration)
{
pic2cTran.LocalPosition = Vector3.Lerp(pic2cTran.LocalPosition, listOfCutscene2Points[2].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic2cTran.LocalPosition = listOfCutscene2Points[2].LocalPosition;
alphaIn = 1.0f;
}
pic2cRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic2c = false;
cutscene2Done = true;
text2.Enabled = true;
time = 0;
alphaIn = 0;
}
}
}
}
private void Canvas3()
{
if (canvas3.IsActiveSelf)
{
if (showPic3a)
{
2023-03-10 19:07:10 +08:00
if(time == 0 && !skip)
{
AudioHandler.audioClipHandlers["cutscenePanelSlide"].Play();
AudioHandler.audioClipHandlers["cutscene3Jump"].Play();
}
2023-02-28 01:57:00 +08:00
if (time < duration)
{
pic3aTran.LocalPosition = Vector3.Lerp(pic3aTran.LocalPosition, listOfCutscene3Points[0].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic3aTran.LocalPosition = listOfCutscene3Points[0].LocalPosition;
alphaIn = 1.0f;
}
pic3aRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic3a = false;
showPic3b = true;
time = 0;
alphaIn = 0;
}
}
if (showPic3b)
{
2023-03-10 19:07:10 +08:00
if (time == 0 && !skip)
{
AudioHandler.audioClipHandlers["cutscenePanelSlide"].Play();
AudioHandler.audioClipHandlers["cutscene3Sparkle"].Play();
}
2023-02-28 01:57:00 +08:00
if (time < duration)
{
pic3bTran.LocalPosition = Vector3.Lerp(pic3bTran.LocalPosition, listOfCutscene3Points[1].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic3bTran.LocalPosition = listOfCutscene3Points[1].LocalPosition;
alphaIn = 1.0f;
}
pic3bRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic3b = false;
showPic3c = true;
time = 0;
alphaIn = 0;
}
}
if (showPic3c)
{
2023-03-10 19:07:10 +08:00
if (time == 0 && !skip)
{
AudioHandler.audioClipHandlers["cutscenePanelSlide"].Play();
AudioHandler.audioClipHandlers["cutscene3Carry"].Play();
}
2023-02-28 01:57:00 +08:00
if (time < duration)
{
pic3cTran.LocalPosition = Vector3.Lerp(pic3cTran.LocalPosition, listOfCutscene3Points[2].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic3cTran.LocalPosition = listOfCutscene3Points[2].LocalPosition;
alphaIn = 1.0f;
}
pic3cRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic3c = false;
showPic3d = true;
time = 0;
alphaIn = 0;
}
}
if (showPic3d)
{
2023-03-10 19:07:10 +08:00
if (time == 0 && !skip)
{
AudioHandler.audioClipHandlers["cutscenePanelSlide"].Play();
AudioHandler.audioClipHandlers["cutscene3Throw"].Play();
}
2023-02-28 01:57:00 +08:00
if (time < duration)
{
pic3dTran.LocalPosition = Vector3.Lerp(pic3dTran.LocalPosition, listOfCutscene3Points[3].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic3dTran.LocalPosition = listOfCutscene3Points[3].LocalPosition;
alphaIn = 1.0f;
}
pic3dRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic3d = false;
showPic3e = true;
time = 0;
alphaIn = 0;
}
}
if (showPic3e)
{
2023-03-10 19:07:10 +08:00
if (time == 0 && !skip)
{
AudioHandler.audioClipHandlers["cutscenePanelSlide"].Play();
AudioHandler.audioClipHandlers["cutscene3Yay"].Play();
}
2023-02-28 01:57:00 +08:00
if (time < duration)
{
pic3eTran.LocalPosition = Vector3.Lerp(pic3eTran.LocalPosition, listOfCutscene3Points[4].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic3eTran.LocalPosition = listOfCutscene3Points[4].LocalPosition;
alphaIn = 1.0f;
}
pic3eRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic3e = false;
cutscene3Done = true;
text3.Enabled = true;
time = 0;
alphaIn = 0;
}
}
}
}
private void initCutscene1()
2023-02-27 15:33:58 +08:00
{
if(cutscene1Points)
listOfCutscene1Points = cutscene1Points.GetComponentsInChildren<Transform>().ToList();
else
Debug.LogError("Cutscene1Points Missing");
2023-02-27 15:33:58 +08:00
if (listOfCutscene1Points.Count == 0)
Debug.LogError("Cutscene1Points Empty");
listOfCutscene1Pics = cutscene1Pics.GetComponentsInChildren<Renderable>().ToList();
if (listOfCutscene1Pics.Count == 0)
Debug.LogError("Cutscene1Pics Empty");
if (listOfCutscene1Pics[0])
2023-02-28 01:57:00 +08:00
{
pic1aRenderable = listOfCutscene1Pics[0].GetComponent<Renderable>();
pic1aTran = listOfCutscene1Pics[0].GetComponent<Transform>();
2023-02-28 01:57:00 +08:00
pic1aRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
2023-02-27 15:33:58 +08:00
}
else
2023-02-28 01:57:00 +08:00
Debug.LogError("SCENE 1 PIC1 MISSING");
2023-02-27 15:33:58 +08:00
if (listOfCutscene1Pics[1])
2023-02-28 01:57:00 +08:00
{
pic1bRenderable = listOfCutscene1Pics[1].GetComponent<Renderable>();
pic1bTran = listOfCutscene1Pics[1].GetComponent<Transform>();
pic1bRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
2023-02-27 15:33:58 +08:00
}
else
2023-02-28 01:57:00 +08:00
Debug.LogError("SCENE 1 PIC2 MISSING");
2023-02-27 15:33:58 +08:00
if (listOfCutscene1Pics[2])
2023-02-28 01:57:00 +08:00
{
pic1cRenderable = listOfCutscene1Pics[2].GetComponent<Renderable>();
pic1cTran = listOfCutscene1Pics[2].GetComponent<Transform>();
pic1cRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
2023-02-27 15:33:58 +08:00
}
else
2023-02-28 01:57:00 +08:00
Debug.LogError("SCENE 1 PIC3 MISSING");
2023-02-27 15:33:58 +08:00
2023-02-28 01:57:00 +08:00
if (canvas1)
{
text1 = canvas1.GetComponentInChildren<TextRenderable>();
text1.Enabled = false;
}
else
Debug.LogError("Canvas 1 missing");
2023-02-27 15:33:58 +08:00
}
2023-02-28 01:57:00 +08:00
private void initCutscene2()
2023-02-27 15:33:58 +08:00
{
if(cutscene2Points)
listOfCutscene2Points = cutscene2Points.GetComponentsInChildren<Transform>().ToList();
else
Debug.LogError("cutscene2Points Missing");
2023-02-28 01:57:00 +08:00
if (listOfCutscene2Points.Count == 0)
Debug.LogError("Cutscene2Points Empty");
listOfCutscene2Pics = cutscene2Pics.GetComponentsInChildren<Renderable>().ToList();
if (listOfCutscene2Pics.Count == 0)
Debug.LogError("Cutscene2Pics Empty");
2023-02-27 15:33:58 +08:00
2023-02-28 01:57:00 +08:00
if (listOfCutscene2Pics[0])
2023-02-27 15:33:58 +08:00
{
2023-02-28 01:57:00 +08:00
pic2aRenderable = listOfCutscene2Pics[0].GetComponent<Renderable>();
pic2aTran = listOfCutscene2Pics[0].GetComponent<Transform>();
pic2aRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 2 PIC1 MISSING");
2023-02-27 15:33:58 +08:00
2023-02-28 01:57:00 +08:00
if (listOfCutscene2Pics[1])
{
pic2bRenderable = listOfCutscene2Pics[1].GetComponent<Renderable>();
pic2bTran = listOfCutscene2Pics[1].GetComponent<Transform>();
pic2bRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
2023-02-27 15:33:58 +08:00
}
2023-02-28 01:57:00 +08:00
else
Debug.LogError("SCENE 2 PIC2 MISSING");
2023-02-27 15:33:58 +08:00
2023-02-28 01:57:00 +08:00
if (listOfCutscene2Pics[2])
2023-02-27 15:33:58 +08:00
{
2023-02-28 01:57:00 +08:00
pic2cRenderable = listOfCutscene2Pics[2].GetComponent<Renderable>();
pic2cTran = listOfCutscene2Pics[2].GetComponent<Transform>();
pic2cRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 2 PIC3 MISSING");
2023-02-27 15:33:58 +08:00
2023-02-28 01:57:00 +08:00
if (canvas2)
{
text2 = canvas2.GetComponentInChildren<TextRenderable>();
text2.Enabled = false;
canvas2.SetActive(false);
2023-02-27 15:33:58 +08:00
}
2023-02-28 01:57:00 +08:00
else
Debug.LogError("Canvas 2 missing");
}
private void initCutscene3()
{
if(cutscene3Points)
listOfCutscene3Points = cutscene3Points.GetComponentsInChildren<Transform>().ToList();
else
Debug.LogError("cutscene3Points Missing");
2023-02-28 01:57:00 +08:00
if (listOfCutscene3Points.Count == 0)
Debug.LogError("Cutscene3Points Empty");
listOfCutscene3Pics = cutscene3Pics.GetComponentsInChildren<Renderable>().ToList();
if (listOfCutscene3Pics.Count == 0)
Debug.LogError("Cutscene3Pics Empty");
2023-02-27 15:33:58 +08:00
2023-02-28 01:57:00 +08:00
if (listOfCutscene3Pics[0])
2023-02-27 15:33:58 +08:00
{
2023-02-28 01:57:00 +08:00
pic3aRenderable = listOfCutscene3Pics[0].GetComponent<Renderable>();
pic3aTran = listOfCutscene3Pics[0].GetComponent<Transform>();
pic3aRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 3 PIC1 MISSING");
2023-02-27 15:33:58 +08:00
2023-02-28 01:57:00 +08:00
if (listOfCutscene3Pics[1])
{
pic3bRenderable = listOfCutscene3Pics[1].GetComponent<Renderable>();
pic3bTran = listOfCutscene3Pics[1].GetComponent<Transform>();
pic3bRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
2023-02-27 15:33:58 +08:00
}
2023-02-28 01:57:00 +08:00
else
Debug.LogError("SCENE 3 PIC2 MISSING");
if (listOfCutscene3Pics[2])
{
pic3cRenderable = listOfCutscene3Pics[2].GetComponent<Renderable>();
pic3cTran = listOfCutscene3Pics[2].GetComponent<Transform>();
pic3cRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 3 PIC3 MISSING");
if (listOfCutscene3Pics[3])
{
pic3dRenderable = listOfCutscene3Pics[3].GetComponent<Renderable>();
pic3dTran = listOfCutscene3Pics[3].GetComponent<Transform>();
pic3dRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 3 PIC4 MISSING");
if (listOfCutscene3Pics[4])
{
pic3eRenderable = listOfCutscene3Pics[4].GetComponent<Renderable>();
pic3eTran = listOfCutscene3Pics[4].GetComponent<Transform>();
pic3eRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 2 PIC5 MISSING");
if (canvas3)
{
text3 = canvas3.GetComponentInChildren<TextRenderable>();
text3.Enabled = false;
canvas3.SetActive(false);
}
else
Debug.LogError("Canvas 3 missing");
2023-02-27 15:33:58 +08:00
}
}