Skip to content

Commit

Permalink
Merge pull request #66 from Shadow-Wizard-Games/develop-narrative-intro
Browse files Browse the repository at this point in the history
Develop narrative intro
  • Loading branch information
softdrawss authored Apr 16, 2024
2 parents 05b48ee + d68b02f commit d847daf
Show file tree
Hide file tree
Showing 6 changed files with 163 additions and 1 deletion.
134 changes: 134 additions & 0 deletions TheOneEditor/Assets/Scenes/IntroScene.toe
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
{
"GameObjects": [
{
"Components": [
{
"Name": "Transform",
"Transformation Matrix": [
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0
],
"Type": 0,
"UID": 4132926587
},
{
"Aspect": 1.777,
"CameraType": 0,
"FOV": 65.0,
"Name": "Camera",
"ParentUID": 3452816845,
"Pitch": 0.0,
"PrimaryCamera": false,
"Size": 5.0,
"Type": 1,
"UID": 213738418,
"Yaw": 0.0,
"zFar": 1000.0,
"zNear": 0.1
}
],
"Enabled": true,
"Name": "mainCamera",
"ParentUID": 3452816845,
"Static": false,
"UID": 3452816845
},
{
"Components": [
{
"Name": "Transform",
"Transformation Matrix": [
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0
],
"Type": 0,
"UID": 987700871
},
{
"Name": "Script",
"ParentUID": 3452816845,
"ScriptName": "IntroScene",
"Type": 4,
"UID": 1823036633
},
{
"DebugDraw": true,
"Enabled": true,
"Name": "Canvas",
"ParentUID": 3452816845,
"Rect": [
0.0,
0.0,
2.0,
2.0
],
"Type": 6,
"UID": 686362909,
"UiElements": [
{
"ID": 3746357633,
"ImagePath": "Assets/Textures/Hud/Placeholder2.png",
"ImageSection": [
0.0,
0.0,
1.0,
1.0
],
"Interactuable": false,
"Name": "Image",
"Rect": [
0.0,
0.0,
1.0,
1.0
],
"State": 0,
"Type": 0
}
],
"UiTextures": [
{
"Path": "Assets/Textures/Hud/Placeholder2.png"
}
]
}
],
"Enabled": true,
"Name": "IntroScene",
"ParentUID": 3452816845,
"Static": false,
"UID": 3452816845
}
],
"index": 0,
"path": "Assets\\Scenes\\IntroScene.toe",
"sceneName": "IntroScene"
}
Binary file added TheOneEditor/Assets/Textures/Hud/Placeholder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added TheOneEditor/Assets/Textures/Hud/Placeholder2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions TheOneScriptingEngine/IntroScene.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
class IntroScene : MonoBehaviour
{
public ICanvas canvasText;

private float timerScene = 0.0f;
private float durationScene = 8.0f;

public override void Start()
{
canvasText = new ICanvas(containerGOptr);
}

public override void Update()
{
timerScene += Time.deltaTime;

if (Input.GetKeyboardButton(Input.KeyboardCode.RETURN) ||
Input.GetKeyboardButton(Input.KeyboardCode.SPACEBAR) ||
Input.GetControllerButton(Input.ControllerButtonCode.X) ||
timerScene >= durationScene)
{

SceneManager.LoadScene("Level1");
}
}
}

2 changes: 1 addition & 1 deletion TheOneScriptingEngine/MainMenuManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public override void Update()
// Selection Executters
if ((Input.GetControllerButton(Input.ControllerButtonCode.X) || Input.GetKeyboardButton(Input.KeyboardCode.RETURN)) && canvas.GetSelection() == 0)
{
SceneManager.LoadScene("L1R1");
SceneManager.LoadScene("IntroScene");
attachedGameObject.source.StopAudio(AudioManager.EventIDs.UI_A_MENU);
attachedGameObject.source.PlayAudio(AudioManager.EventIDs.UI_CLICK);
}
Expand Down
1 change: 1 addition & 0 deletions TheOneScriptingEngine/TheOneScriptingEngine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
<Compile Include="CamControlTest.cs" />
<Compile Include="CameraMovement.cs" />
<Compile Include="ChestBusterBehaviour.cs" />
<Compile Include="IntroScene.cs" />
<Compile Include="Color.cs" />
<Compile Include="Debug.cs" />
<Compile Include="Event.cs" />
Expand Down

0 comments on commit d847daf

Please sign in to comment.