cleaning up scenes and WIP for previewlevel camera

This commit is contained in:
Glence 2023-03-01 18:05:42 +08:00
parent d5c9010661
commit 403df62a0b
6 changed files with 2790 additions and 324 deletions

View File

@ -521,47 +521,11 @@
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Half Extents: {x: 1.10000002, y: 2, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0.0299999993, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0.5, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0.985000014, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 1.47500002, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 1.97000003, z: 0}
Position Offset: {x: 0, y: 1, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
@ -584,47 +548,11 @@
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Half Extents: {x: 1.10000002, y: 2, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0.0299999993, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0.5, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0.985000014, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 1.47500002, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 1.97000003, z: 0}
Position Offset: {x: 0, y: 1, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
@ -647,47 +575,11 @@
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Half Extents: {x: 1.10000002, y: 2, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0.0299999993, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0.5, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0.985000014, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 1.47500002, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 1.97000003, z: 0}
Position Offset: {x: 0, y: 1, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
@ -836,47 +728,11 @@
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Half Extents: {x: 1.10000002, y: 2, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0.0299999993, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0.5, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0.985000014, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 1.47500002, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 1.97000003, z: 0}
Position Offset: {x: 0, y: 1, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
@ -962,47 +818,11 @@
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Half Extents: {x: 1.10000002, y: 2, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0.0299999993, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0.5, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0.985000014, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 1.47500002, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1.04999995, y: 0.0500000007, z: 0.550000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 1.97000003, z: 0}
Position Offset: {x: 0, y: 1, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
@ -2583,7 +2403,7 @@
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0}
Rotate: {x: -1.48352981, y: 0, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Renderable Component:
@ -4284,7 +4104,7 @@
- EID: 199
Name: =====Text====
IsActive: true
NumberOfChildren: 4
NumberOfChildren: 3
Components: ~
Scripts: ~
- EID: 237
@ -4332,21 +4152,6 @@
Font: 176667660
IsActive: true
Scripts: ~
- EID: 454
Name: GamePause
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -250, y: 300, z: 0.100000001}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 100, y: 100, z: 100}
IsActive: true
Text Renderer Component:
Text: Game Pause
Font: 176667660
IsActive: false
Scripts: ~
- EID: 236
Name: ====GameManager====
IsActive: true
@ -4372,7 +4177,6 @@
resumeBtn: 457
retryBtn: 455
quitBtn: 456
gamePauseText: 454
canvas: 458
- EID: 235
Name: ====AI=====
@ -4407,7 +4211,7 @@
- Is Trigger: false
Collision Tag: 5
Type: Box
Half Extents: {x: 1, y: 1.79999995, z: 0.400000006}
Half Extents: {x: 0.600000024, y: 1.79999995, z: 0.400000006}
Friction: 0.400000006
Bounciness: 0
Density: 1
@ -5192,8 +4996,8 @@
FOV: 45
IsActive: true
Camera Arm Component:
Arm Pitch: 0
Arm Yaw: 0
Arm Pitch: 45
Arm Yaw: -90
Arm Length: 1
Look At Camera Origin: true
Target Offset: {x: 0, y: 0.75, z: 0}
@ -5299,7 +5103,7 @@
- Type: SHADE_Scripting.UI.StealFoodPopUp
Enabled: true
popInDuration: 0.5
popOutDuration: 0.5
popOutDuration: 0.075000003
stayDuration: 1
rotationAmt: 1800
scaleAmtX: 538
@ -5315,9 +5119,42 @@
- EID: 461
Name: CameraPoints
IsActive: true
NumberOfChildren: 0
NumberOfChildren: 3
Components: ~
Scripts: ~
- EID: 453
Name: PreviewLevel1
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -7.59216642, y: 1.49918437, z: -1.37255788}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~
- EID: 452
Name: PreviewLevel2
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -3.13806891, y: 1.33345056, z: -7.42731333}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~
- EID: 451
Name: PreviewLevel3
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 4.74025965, y: 1.62911224, z: -7.82088184}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~
- EID: 459
Name: PreviewLevelCamera
IsActive: true
@ -5343,7 +5180,7 @@
- EID: 458
Name: PauseCanvas
IsActive: true
NumberOfChildren: 3
NumberOfChildren: 4
Components:
Canvas Component:
Canvas Width: 1920
@ -5426,3 +5263,23 @@
Clicked: false
IsActive: true
Scripts: ~
- EID: 454
Name: GamePauseText
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -250, y: 300, z: 0.100000001}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 100, y: 100, z: 100}
IsActive: true
Text Renderer Component:
Text: Game Pause
Font: 176667660
IsActive: false
UI Component:
Canvas ID: 458
Hovered: false
Clicked: false
IsActive: true
Scripts: ~

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,47 @@
using SHADE;
using System;
using System.Collections.Generic;
using System.Linq;
public class PreviewLevel : Script
{
public GameObject previewLevelPoints;
private List<Transform> listOfpreviewLevelPoints;
private Transform tran;
public Vector3 endPoint1;
public Vector3 endPoint2;
public Vector3 endPoint3;
public float duration = 3.0f;
private bool point1Done;
private bool point2Done;
private bool point3Done;
protected override void awake()
{
//GetComponent<Camera>().SetMainCamera();
if (previewLevelPoints)
listOfpreviewLevelPoints = previewLevelPoints.GetComponentsInChildren<Transform>().ToList();
else
Debug.LogError("MISSING PREVIEW POINTS");
if(listOfpreviewLevelPoints.Count == 0)
Debug.LogError("EMPTY PREVIEW POINTS");
tran = GetComponent<Transform>();
if (!tran)
Debug.LogError("MISSING PREVIEW TRANSFORM");
else
tran.LocalPosition = listOfpreviewLevelPoints[0].LocalPosition;
}
protected override void update()
{
}
}

View File

@ -409,7 +409,11 @@ public class Cutscene : Script
private void initCutscene1()
{
listOfCutscene1Points = cutscene1Points.GetComponentsInChildren<Transform>().ToList();
if(cutscene1Points)
listOfCutscene1Points = cutscene1Points.GetComponentsInChildren<Transform>().ToList();
else
Debug.LogError("Cutscene1Points Missing");
if (listOfCutscene1Points.Count == 0)
Debug.LogError("Cutscene1Points Empty");
@ -455,7 +459,11 @@ public class Cutscene : Script
private void initCutscene2()
{
listOfCutscene2Points = cutscene2Points.GetComponentsInChildren<Transform>().ToList();
if(cutscene2Points)
listOfCutscene2Points = cutscene2Points.GetComponentsInChildren<Transform>().ToList();
else
Debug.LogError("cutscene2Points Missing");
if (listOfCutscene2Points.Count == 0)
Debug.LogError("Cutscene2Points Empty");
@ -503,7 +511,11 @@ public class Cutscene : Script
private void initCutscene3()
{
listOfCutscene3Points = cutscene3Points.GetComponentsInChildren<Transform>().ToList();
if(cutscene3Points)
listOfCutscene3Points = cutscene3Points.GetComponentsInChildren<Transform>().ToList();
else
Debug.LogError("cutscene3Points Missing");
if (listOfCutscene3Points.Count == 0)
Debug.LogError("Cutscene3Points Empty");

View File

@ -8,16 +8,18 @@ public class PauseMenu : Script
public GameObject retryBtn;
public GameObject quitBtn;
public GameObject gamePauseText;
private TextRenderable gamePauseText;
public GameObject canvas;
protected override void awake()
{
GameManager.Instance.GamePause = false;
if (gamePauseText)
gamePauseText.GetComponent<TextRenderable>().Enabled = false;
if (canvas)
{
gamePauseText = canvas.GetComponentInChildren<TextRenderable>();
canvas.SetActive(false);
}
if (!resumeBtn)
Debug.LogError("Resume Btn missing");
@ -41,7 +43,7 @@ public class PauseMenu : Script
GameManager.Instance.GamePause = false;
AudioHandler.pauseAllSounds(false);
if (gamePauseText)
gamePauseText.GetComponent<TextRenderable>().Enabled = false;
gamePauseText.Enabled = false;
if (canvas)
canvas.SetActive(false);
}
@ -91,7 +93,7 @@ public class PauseMenu : Script
GameManager.Instance.GamePause = true;
AudioHandler.pauseAllSounds(true);
if (gamePauseText)
gamePauseText.GetComponent<TextRenderable>().Enabled = true;
gamePauseText.Enabled = true;
if (canvas)
canvas.SetActive(true);
}