Updates for presentation build #399

Merged
glencelow merged 9 commits from PlayerController into main 2023-03-05 15:41:22 +08:00
33 changed files with 742 additions and 8 deletions
Showing only changes of commit 27b00a6c4a - Show all commits

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: UI
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 51238312
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: CutScene_04a
ID: 130935405
Type: 7

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: UI
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 61471971
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: CutScene_04b
ID: 122461516
Type: 7

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: UI
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 58217538
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: CutScene_04c
ID: 124507864
Type: 7

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: UI
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 61980534
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: CutScene_05a
ID: 118069989
Type: 7

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: UI
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 51561286
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: CutScene_05b
ID: 132945336
Type: 7

View File

@ -0,0 +1,333 @@
- EID: 1
Name: Canvas4
IsActive: true
NumberOfChildren: 3
Components:
Canvas Component:
Canvas Width: 1920
Canvas Height: 1080
Scale by canvas width: false
IsActive: true
Scripts: ~
- EID: 10
Name: CutScene4
IsActive: true
NumberOfChildren: 3
Components:
UI Component:
Canvas ID: 1
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 2
Name: pic1
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -1275, y: 255, z: 0.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1313, y: 544, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 130935405
IsActive: true
UI Component:
Canvas ID: 1
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 65542
Name: pic2
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 1600, y: 150, z: 0.400000006}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 640, y: 661, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 122461516
IsActive: true
UI Component:
Canvas ID: 1
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 5
Name: pic3
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -1000, y: -275, z: 0.300000012}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1848, y: 575, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 124507864
IsActive: true
UI Component:
Canvas ID: 1
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 11
Name: Background
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0.699999988}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1920, y: 1080, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 117531460
IsActive: true
UI Component:
Canvas ID: 1
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 12
Name: Text
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 250, y: -500, z: 0.100000001}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 50, y: 50, z: 50}
IsActive: true
Text Renderer Component:
Text: Press Space to contiune
Font: 176667660
Color: {x: 1, y: 1, z: 1, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: true
UI Component:
Canvas ID: 1
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 3
Name: Camera
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Camera Component:
Position: {x: 0, y: 0, z: 0}
Pitch: 0
Yaw: 0
Roll: 0
Width: 1920
Near: 0.00999999978
Far: 10000
Perspective: true
FOV: 90
IsActive: true
Scripts: ~
- EID: 7
Name: CutsceneManager
IsActive: true
NumberOfChildren: 0
Components: ~
Scripts:
- Type: CutsceneEnd
Enabled: true
duration: 1
skipDuration: 0.100000001
cutscene4Points: 4
cutscene4Pics: 10
cutscene5Points: 21
cutscene5Pics: 15
canvas4: 1
canvas5: 14
- EID: 4
Name: CutScene4Points
IsActive: true
NumberOfChildren: 3
Components: ~
Scripts: ~
- EID: 9
Name: Pic1Point
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -275, y: 255, z: 0.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~
- EID: 8
Name: Pic2Point
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 600, y: 150, z: 0.400000006}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~
- EID: 65549
Name: Pic3Point
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: -275, z: 0.300000012}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~
- EID: 14
Name: Canvas5
IsActive: false
NumberOfChildren: 3
Components:
Canvas Component:
Canvas Width: 1920
Canvas Height: 1080
Scale by canvas width: false
IsActive: false
Scripts: ~
- EID: 15
Name: CutScene5
IsActive: true
NumberOfChildren: 2
Components:
UI Component:
Canvas ID: 14
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 16
Name: pic1
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -600, y: 1000, z: 0.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 634, y: 1027, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 118069989
IsActive: true
UI Component:
Canvas ID: 14
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 17
Name: pic2
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 250, y: -1000, z: 0.400000006}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1337, y: 1028, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 132945336
IsActive: true
UI Component:
Canvas ID: 14
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 19
Name: Background
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0.699999988}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1920, y: 1080, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 117531460
IsActive: true
UI Component:
Canvas ID: 14
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 20
Name: Text
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 250, y: -500, z: 0.100000001}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 50, y: 50, z: 50}
IsActive: true
Text Renderer Component:
Text: Press Space to contiune
Font: 176667660
Color: {x: 1, y: 1, z: 1, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: false
UI Component:
Canvas ID: 14
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 21
Name: CutScene5Points
IsActive: true
NumberOfChildren: 2
Components: ~
Scripts: ~
- EID: 22
Name: Pic1Point
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -600, y: 0, z: 0.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~
- EID: 23
Name: Pic2Point
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 250, y: 0, z: 0.400000006}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~

View File

@ -0,0 +1,3 @@
Name: CutSceneEnd
ID: 84606951
Type: 5

View File

@ -113,6 +113,8 @@
Text Renderer Component:
Text: Press Space to contiune
Font: 176667660
Color: {x: 1, y: 1, z: 1, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: true
UI Component:
Canvas ID: 1
@ -148,9 +150,9 @@
NumberOfChildren: 0
Components: ~
Scripts:
- Type: Cutscene
- Type: CutsceneIntro
Enabled: true
duration: 2
duration: 1
cutscene1Points: 4
cutscene1Pics: 10
cutscene2Points: 20
@ -314,6 +316,8 @@
Text Renderer Component:
Text: Press Space to contiune
Font: 176667660
Color: {x: 1, y: 1, z: 1, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: true
UI Component:
Canvas ID: 13
@ -515,6 +519,8 @@
Text Renderer Component:
Text: Press Space to contiune
Font: 176667660
Color: {x: 1, y: 1, z: 1, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: false
UI Component:
Canvas ID: 24

View File

@ -0,0 +1,317 @@
using System;
using System.Collections.Generic;
using System.Linq;
using SHADE;
public class CutsceneEnd : Script
{
public uint nextScene;
public float duration = 3.0f;
public float skipDuration = 0.1f;
private float oldDuration = 0.0f;
private Renderable pic4aRenderable;
private Renderable pic4bRenderable;
private Renderable pic4cRenderable;
private Renderable pic5aRenderable;
private Renderable pic5bRenderable;
private Transform pic4aTran;
private Transform pic4bTran;
private Transform pic4cTran;
private Transform pic5aTran;
private Transform pic5bTran;
private float alphaIn = 0.0f;
private float time = 0.0f;
private bool showPic4a = true;
private bool showPic4b = false;
private bool showPic4c = false;
private bool showPic5a = true;
private bool showPic5b = false;
private bool skip = false;
public GameObject cutscene4Points;
private List<Transform> listOfCutscene4Points;
public GameObject cutscene4Pics;
private List<Renderable> listOfCutscene4Pics;
public GameObject cutscene5Points;
private List<Transform> listOfCutscene5Points;
public GameObject cutscene5Pics;
private List<Renderable> listOfCutscene5Pics;
private TextRenderable text4;
private TextRenderable text5;
public GameObject canvas4;
public GameObject canvas5;
private bool cutscene4Done = false;
private bool cutscene5Done = false;
protected override void awake()
{
initCutscene4();
initCutscene5();
}
protected override void update()
{
Canvas4();
Canvas5();
if (Input.GetKeyDown(Input.KeyCode.Space) && !skip && (!cutscene4Done || !cutscene5Done))
{
skip = true;
oldDuration = duration;
duration = skipDuration;
}
if (Input.GetKeyDown(Input.KeyCode.Space) && cutscene4Done && canvas4.IsActiveSelf)
{
canvas4.SetActive(false);
canvas5.SetActive(true);
duration = oldDuration;
skip = false;
}
if (Input.GetKeyDown(Input.KeyCode.Space) && cutscene5Done && canvas5.IsActiveSelf)
{
SceneManager.ChangeScene(nextScene);
}
}
private void Canvas4()
{
if (canvas4.IsActiveSelf)
{
if (showPic4a)
{
if (time < duration)
{
pic4aTran.LocalPosition = Vector3.Lerp(pic4aTran.LocalPosition, listOfCutscene4Points[0].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic4aTran.LocalPosition = listOfCutscene4Points[0].LocalPosition;
alphaIn = 1.0f;
}
pic4aRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic4a = false;
showPic4b = true;
time = 0;
alphaIn = 0;
}
}
if (showPic4b)
{
if (time < duration)
{
pic4bTran.LocalPosition = Vector3.Lerp(pic4bTran.LocalPosition, listOfCutscene4Points[1].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic4bTran.LocalPosition = listOfCutscene4Points[1].LocalPosition;
alphaIn = 1.0f;
}
pic4bRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic4b = false;
showPic4c = true;
time = 0;
alphaIn = 0;
}
}
if (showPic4c)
{
if (time < duration)
{
pic4cTran.LocalPosition = Vector3.Lerp(pic4cTran.LocalPosition, listOfCutscene4Points[2].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic4cTran.LocalPosition = listOfCutscene4Points[2].LocalPosition;
alphaIn = 1.0f;
}
pic4cRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic4c = false;
cutscene4Done = true;
text4.Enabled = true;
time = 0;
alphaIn = 0;
}
}
}
}
private void Canvas5()
{
if (canvas5.IsActiveSelf)
{
if (showPic5a)
{
if (time < duration)
{
pic5aTran.LocalPosition = Vector3.Lerp(pic5aTran.LocalPosition, listOfCutscene5Points[0].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic5aTran.LocalPosition = listOfCutscene5Points[0].LocalPosition;
alphaIn = 1.0f;
}
pic5aRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic5a = false;
showPic5b = true;
time = 0;
alphaIn = 0;
}
}
if (showPic5b)
{
if (time < duration)
{
pic5bTran.LocalPosition = Vector3.Lerp(pic5bTran.LocalPosition, listOfCutscene5Points[1].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic5bTran.LocalPosition = listOfCutscene5Points[1].LocalPosition;
alphaIn = 1.0f;
}
pic5bRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic5b = false;
text5.Enabled = true;
cutscene5Done = true;
time = 0;
alphaIn = 0;
}
}
}
}
private void initCutscene4()
{
if (cutscene4Points)
listOfCutscene4Points = cutscene4Points.GetComponentsInChildren<Transform>().ToList();
else
Debug.LogError("Cutscene4Points Missing");
if (listOfCutscene4Points.Count == 0)
Debug.LogError("Cutscene4Points Empty");
listOfCutscene4Pics = cutscene4Pics.GetComponentsInChildren<Renderable>().ToList();
if (listOfCutscene4Pics.Count == 0)
Debug.LogError("Cutscene4Pics Empty");
if (listOfCutscene4Pics[0])
{
pic4aRenderable = listOfCutscene4Pics[0].GetComponent<Renderable>();
pic4aTran = listOfCutscene4Pics[0].GetComponent<Transform>();
pic4aRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 4 PIC1 MISSING");
if (listOfCutscene4Pics[1])
{
pic4bRenderable = listOfCutscene4Pics[1].GetComponent<Renderable>();
pic4bTran = listOfCutscene4Pics[1].GetComponent<Transform>();
pic4bRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 4 PIC2 MISSING");
if (listOfCutscene4Pics[2])
{
pic4cRenderable = listOfCutscene4Pics[2].GetComponent<Renderable>();
pic4cTran = listOfCutscene4Pics[2].GetComponent<Transform>();
pic4cRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 1 PIC3 MISSING");
if (canvas4)
{
text4 = canvas4.GetComponentInChildren<TextRenderable>();
text4.Enabled = false;
}
else
Debug.LogError("Canvas 4 missing");
}
private void initCutscene5()
{
if (cutscene5Points)
listOfCutscene5Points = cutscene5Points.GetComponentsInChildren<Transform>().ToList();
else
Debug.LogError("cutscene5Points Missing");
if (listOfCutscene5Points.Count == 0)
Debug.LogError("Cutscene5Points Empty");
listOfCutscene5Pics = cutscene5Pics.GetComponentsInChildren<Renderable>().ToList();
if (listOfCutscene5Pics.Count == 0)
Debug.LogError("Cutscene5Pics Empty");
if (listOfCutscene5Pics[0])
{
pic5aRenderable = listOfCutscene5Pics[0].GetComponent<Renderable>();
pic5aTran = listOfCutscene5Pics[0].GetComponent<Transform>();
pic5aRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 5 PIC1 MISSING");
if (listOfCutscene5Pics[1])
{
pic5bRenderable = listOfCutscene5Pics[1].GetComponent<Renderable>();
pic5bTran = listOfCutscene5Pics[1].GetComponent<Transform>();
pic5bRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 5 PIC2 MISSING");
if (canvas5)
{
text5 = canvas5.GetComponentInChildren<TextRenderable>();
text5.Enabled = false;
canvas5.SetActive(false);
}
else
Debug.LogError("Canvas 5 missing");
}
}

View File

@ -0,0 +1,3 @@
Name: SC_CutSceneEnd
ID: 153706859
Type: 9

View File

@ -1,3 +0,0 @@
Name: SC_Cutscene
ID: 157565851
Type: 9

View File

@ -4,10 +4,12 @@ using System.Linq;
using SHADE;
public class Cutscene : Script
public class CutsceneIntro : Script
{
public uint nextScene;
public float duration = 3.0f;
public float skipDuration = 0.1f;
private float oldDuration = 0.0f;
private Renderable pic1aRenderable;
@ -97,7 +99,7 @@ public class Cutscene : Script
{
skip = true;
oldDuration = duration;
duration = 0.1f;
duration = skipDuration;
}
if (Input.GetKeyDown(Input.KeyCode.Space) && cutscene1Done && canvas1.IsActiveSelf)
@ -118,7 +120,7 @@ public class Cutscene : Script
if (Input.GetKeyDown(Input.KeyCode.Space) && cutscene3Done && canvas3.IsActiveSelf)
{
//change scene
SceneManager.ChangeScene(nextScene);
}
}

View File

@ -0,0 +1,3 @@
Name: SC_CutsceneIntro
ID: 154967292
Type: 9

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_cutscene_04a
ID: 51238312
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_cutscene_04b
ID: 61471971
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_cutscene_04c
ID: 58217538
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_cutscene_05a
ID: 61980534
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_cutscene_05b
ID: 51561286
Type: 3