doing up the main menu

This commit is contained in:
Glence 2022-11-22 16:18:16 +08:00
parent be16e46872
commit 71e8ba6044
33 changed files with 93 additions and 6 deletions

View File

@ -3,6 +3,6 @@
SubPass: G-Buffer Write SubPass: G-Buffer Write
Properties: Properties:
data.color: {x: 1, y: 1, z: 1, w: 1} data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 0 data.textureIndex: 54429632
data.alpha: 0 data.alpha: 0
data.beta: {x: 1, y: 1, z: 1} data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,57 @@
- EID: 0
Name: Default
IsActive: true
NumberOfChildren: 1
Components: ~
Scripts: ~
- EID: 1
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1920, y: 1080, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 129340704
IsActive: true
Scripts: ~
- EID: 2
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Light Component:
Position: {x: 0, y: 0, z: 0}
Type: Directional
Direction: {x: 0, y: 0, z: 1}
Color: {x: 1, y: 1, z: 1, w: 1}
Layer: 4294967295
Strength: 0
IsActive: true
Scripts: ~
- EID: 3
Name: Default
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
Height: 1080
Near: 0.00999999978
Far: 10000
Perspective: true
IsActive: true
Scripts: ~

View File

@ -0,0 +1,3 @@
Name: MainMenu
ID: 97158628
Type: 5

View File

@ -1,3 +1,3 @@
Name: UT_PlayerCaughtState Name: UT_PlayerCaughtState
ID: 154746070 ID: 162030736
Type: 9 Type: 9

View File

@ -0,0 +1,13 @@
using System;
using SHADE;
public class SC_MainMenu : Script
{
protected override void awake()
{
}
protected override void update()
{
}
}

View File

@ -0,0 +1,3 @@
Name: SC_MainMenu
ID: 158552402
Type: 9

View File

@ -43,7 +43,7 @@ void main()
{ {
position = In.vertPos; position = In.vertPos;
normals = In.normal; normals = In.normal;
albedo = vec4(1.0f); albedo = texture(textures[nonuniformEXT(MatProp.data[In2.materialIndex].textureIndex)], In.uv);
outEntityID = In2.eid; outEntityID = In2.eid;
lightLayerIndices = In2.lightLayerIndex; lightLayerIndices = In2.lightLayerIndex;

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_EndScreen
ID: 52936944
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_MainMenu
ID: 54429632
Type: 3

View File

@ -580,12 +580,12 @@ namespace SHADE
assetCollection.emplace(newAsset.id, newAsset); assetCollection.emplace(newAsset.id, newAsset);
SHAssetMetaHandler::WriteMetaData(newAsset); SHAssetMetaHandler::WriteMetaData(newAsset);
} }
else if (ext == TEXTURE_EXTENSION.data()) else if (ext == TEXTURE_EXTENSION)
{ {
SHAsset newAsset{ SHAsset newAsset{
path.stem().string(), path.stem().string(),
GenerateAssetID(AssetType::TEXTURE), GenerateAssetID(AssetType::TEXTURE),
AssetType::SHADER_BUILT_IN, AssetType::TEXTURE,
path, path,
false false
}; };

View File

@ -42,6 +42,7 @@ namespace SHADE
SHCameraComponent* camComponent = SHComponentManager::GetComponent_s<SHCameraComponent>(mainCameraEID); SHCameraComponent* camComponent = SHComponentManager::GetComponent_s<SHCameraComponent>(mainCameraEID);
if (!camComponent) if (!camComponent)
{ {
mainCameraEID = MAX_EID;
SHLOG_WARNING("Camera Director warning: Entity does not have a camera"); SHLOG_WARNING("Camera Director warning: Entity does not have a camera");
return nullptr; return nullptr;
} }

View File

@ -612,7 +612,7 @@ namespace SHADE
{ {
if(editorState == State::PLAY) if(editorState == State::PLAY)
return; return;
if (SaveScene()) if (editorState == State::STOP && SaveScene())
{ {
const SHEditorStateChangeEvent STATE_CHANGE_EVENT const SHEditorStateChangeEvent STATE_CHANGE_EVENT
{ {
@ -622,6 +622,10 @@ namespace SHADE
SHCommandManager::SwapStacks(); SHCommandManager::SwapStacks();
SHEventManager::BroadcastEvent<SHEditorStateChangeEvent>(STATE_CHANGE_EVENT, SH_EDITOR_ON_PLAY_EVENT); SHEventManager::BroadcastEvent<SHEditorStateChangeEvent>(STATE_CHANGE_EVENT, SH_EDITOR_ON_PLAY_EVENT);
} }
else if (editorState == State::PAUSE)
{
editorState = State::PLAY;
}
} }
void SHEditor::Pause() void SHEditor::Pause()