From 9c19d178db29e98bc7dd3f4583bb961bb948d998 Mon Sep 17 00:00:00 2001 From: Brandon Mak Date: Thu, 30 Mar 2023 15:19:54 +0800 Subject: [PATCH 1/9] Implemented color decay and color tint range support for particles --- Assets/Scenes/Scene2.shade | 8 ++- Assets/Shaders/ParticleEmit_CS.glsl | 14 +++- Assets/Shaders/ParticleEmit_CS.shshaderb | Bin 12469 -> 13381 bytes .../ParticleUpdateGrowThenShrink_CS.glsl | 1 + .../Shaders/ParticleUpdateRandomAcc_CS.glsl | 2 + .../Shaders/ParticleUpdateRandomColor_CS.glsl | 1 + Assets/Shaders/ParticleUpdate_CS.glsl | 2 + Assets/Shaders/ParticleUpdate_CS.shshaderb | Bin 7833 -> 8265 bytes Assets/Shaders/Particle_VS.glsl | 2 +- Assets/Shaders/Particle_VS.shshaderb | Bin 6845 -> 6989 bytes .../Inspector/SHEditorComponentView.hpp | 20 ++++++ .../Particles/SHParticleEmitterComponent.cpp | 64 ++++++++++++++++++ .../Particles/SHParticleEmitterComponent.h | 22 ++++++ .../src/Serialization/SHYAMLConverters.h | 10 +++ 14 files changed, 142 insertions(+), 4 deletions(-) diff --git a/Assets/Scenes/Scene2.shade b/Assets/Scenes/Scene2.shade index d284d4ea..6e794990 100644 --- a/Assets/Scenes/Scene2.shade +++ b/Assets/Scenes/Scene2.shade @@ -1,3 +1,4 @@ +- NavData: 0 - EID: 0 Name: Default IsActive: true @@ -170,8 +171,11 @@ Angular Ranges And Offset: {x: 6.19999981, y: 1.10000002, z: 0, w: 0.100000001} Rotation Speed: 0.0309999995 Rotation Decay: 0.0199999996 - Texture Asset ID: 63456868 + Texture Asset ID: 0 Custom Update Shader Asset ID: 0 - Color Tint: {x: 1, y: 0, z: 0, w: 1} + Color Tint: {x: 0, y: 1, z: 0.56387639, w: 1} + Color Tint Range: {x: 0.5, y: 0.5, z: 0.5, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} + Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: ~ \ No newline at end of file diff --git a/Assets/Shaders/ParticleEmit_CS.glsl b/Assets/Shaders/ParticleEmit_CS.glsl index 7b6e60be..e3cf2977 100644 --- a/Assets/Shaders/ParticleEmit_CS.glsl +++ b/Assets/Shaders/ParticleEmit_CS.glsl @@ -14,6 +14,8 @@ struct EmitterParameters float rotationDecay; vec4 lifeAndSizeRange; // min life, max life, min size, max size vec4 colorTint; + vec4 colorTintRange; + vec4 colorDecay; float sizeDecay; uint textureIndex; float padding[2]; @@ -27,6 +29,7 @@ struct ParticleData vec4 acceleration; vec4 scaleAndDecay; vec4 colorTint; + vec4 colorDecay; float life; uint textureIndex; }; @@ -175,9 +178,18 @@ void main() particle.scaleAndDecay.y = particleSize; particle.scaleAndDecay.z = emitterParams.data.sizeDecay; particle.scaleAndDecay.w = emitterParams.data.sizeDecay; + particle.colorDecay = emitterParams.data.colorDecay; + float randRange = rand(seed) * 2.0f - 1.0f; + // Set particle color tint - particle.colorTint = emitterParams.data.colorTint; + particle.colorTint = emitterParams.data.colorTint + vec4 (randRange * emitterParams.data.colorTintRange.x, + randRange * emitterParams.data.colorTintRange.y, + randRange * emitterParams.data.colorTintRange.z, + randRange * emitterParams.data.colorTintRange.w); + + // particle.colorTint = emitterParams.data.colorTint; + // Set the texture for the particle particle.textureIndex = emitterParams.data.textureIndex; diff --git a/Assets/Shaders/ParticleEmit_CS.shshaderb b/Assets/Shaders/ParticleEmit_CS.shshaderb index f0e7b1918e2c3f3dfef1970fdaf6d6dfa236364a..16b1d3665551c0c141b9bb7fa44cedc67b772490 100644 GIT binary patch delta 3857 zcmZvfS#VTE6o&gInaRQyK!Qp^p_KXn4_I1S6l3ZFYA<* zPfK%KzL;+=fYa(`XEdXFR9R;bZBEw(ozaHsVIiRva(xiw}-@s@qQvK2u$JY%6!ybR|5d zgjdSJ4p{(xg|McWpDkV9|9lV(h%T+YD%wA=wsdpt+#u)^Z5uc|IyCU89#-c@OGklo zB%(Out>SdV_`~8HmhqM1Jj(C^njaI_X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7$oT=-Q+HuOPdZ zIkZLnUqz1k^|Ag_aPj!AzJ|ORviH{QH~)1=JihsF6qvZnoU+&xib-xey+|GcQEe7CpZRS-)q=vk3kY$Xh|rw1p}r~ diff --git a/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp b/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp index 961e321a..2858b2af 100644 --- a/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp +++ b/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp @@ -903,6 +903,26 @@ namespace SHADE comp->SetColorTint(val); }); + SHEditorWidgets::DragVec4("Color Decay", {"x", "y", "z", "w"}, + [comp = component]() + { + return comp->GetColorDecay(); + }, + [comp = component](SHVec4 const& val) + { + comp->SetColorDecay(val); + }); + + SHEditorWidgets::DragVec4("Color Tint Range", { "x", "y", "z", "w" }, + [comp = component]() + { + return comp->GetColorTintRange(); + }, + [comp = component](SHVec4 const& val) + { + comp->SetColorTintRange(val); + }); + SHEditorWidgets::DragInt("Texture Index", [comp = component]() diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.cpp index 74eb3727..f7ccc2ed 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.cpp +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.cpp @@ -156,11 +156,45 @@ namespace SHADE cpuEmitterData.colorTint.z = tint.z; } + void SHParticleEmitterComponent::SetColorDecayRGB(SHVec3 const& decay) noexcept + { + cpuEmitterData.colorDecay.x = decay.x; + cpuEmitterData.colorDecay.y = decay.y; + cpuEmitterData.colorDecay.z = decay.z; + } + + void SHParticleEmitterComponent::SetColorDecayAlpha(float alpha) noexcept + { + cpuEmitterData.colorDecay.w = alpha; + } + void SHParticleEmitterComponent::SetColorTintAlpha(float alpha) noexcept { cpuEmitterData.colorTint.w = alpha; } + void SHParticleEmitterComponent::SetColorTintRange(SHVec4 const& tintRange) noexcept + { + cpuEmitterData.colorTintRange = tintRange; + } + + void SHParticleEmitterComponent::SetColorTintRangeRGB(SHVec3 const& tintRange) noexcept + { + cpuEmitterData.colorTintRange.x = tintRange.x; + cpuEmitterData.colorTintRange.y = tintRange.y; + cpuEmitterData.colorTintRange.z = tintRange.z; + } + + void SHParticleEmitterComponent::SetColorTintRangeAlpha(float alpha) noexcept + { + cpuEmitterData.colorTintRange.w = alpha; + } + + void SHParticleEmitterComponent::SetColorDecay(SHVec4 const& decay) noexcept + { + cpuEmitterData.colorDecay = decay; + } + uint32_t SHParticleEmitterComponent::GetEmissionCount(void) const noexcept { return emissionCount; @@ -273,9 +307,39 @@ namespace SHADE return SHVec3 (cpuEmitterData.colorTint.x, cpuEmitterData.colorTint.y, cpuEmitterData.colorTint.z); } + SHVec3 SHParticleEmitterComponent::GetColorDecayRGB(void) const noexcept + { + return SHVec3(cpuEmitterData.colorDecay.x, cpuEmitterData.colorDecay.y, cpuEmitterData.colorDecay.z); + } + + float SHParticleEmitterComponent::GetColorDecayAlpha(void) const noexcept + { + return cpuEmitterData.colorDecay.w; + } + float SHParticleEmitterComponent::GetColorTintAlpha(void) const noexcept { return cpuEmitterData.colorTint.w; } + SHVec4 const& SHParticleEmitterComponent::GetColorTintRange(void) const noexcept + { + return cpuEmitterData.colorTintRange; + } + + SHVec3 SHParticleEmitterComponent::GetColorTintRangeRGB(void) const noexcept + { + return SHVec3(cpuEmitterData.colorTintRange.x, cpuEmitterData.colorTintRange.y, cpuEmitterData.colorTintRange.z); + } + + float SHParticleEmitterComponent::GetColorTintRangeAlpha(void) const noexcept + { + return cpuEmitterData.colorTintRange.w; + } + + SHVec4 const& SHParticleEmitterComponent::GetColorDecay(void) const noexcept + { + return cpuEmitterData.colorDecay; + } + } \ No newline at end of file diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.h b/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.h index 47791c44..f43ebefb 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.h +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.h @@ -46,6 +46,12 @@ namespace SHADE //! Color tint to assign to particles SHVec4 colorTint; + //! Color tint range to assign to particles + SHVec4 colorTintRange; + + //! Color decay for particle + SHVec4 colorDecay; + //! Size decay for particles float sizeDecayMult; @@ -77,6 +83,9 @@ namespace SHADE //! Color tinting for particle SHVec4 colorTint; + //! Color tinting for particle + SHVec4 colorDecay; + //! Life of the particle float life; @@ -172,6 +181,13 @@ namespace SHADE void SetColorTint (SHVec4 tint) noexcept; void SetColorTintRGB (SHVec3 tint) noexcept; void SetColorTintAlpha (float alpha) noexcept; + void SetColorTintRange (SHVec4 const& tintRange) noexcept; + void SetColorTintRangeRGB (SHVec3 const& tintRange) noexcept; + void SetColorTintRangeAlpha (float alpha) noexcept; + + void SetColorDecay (SHVec4 const& decay) noexcept; + void SetColorDecayRGB (SHVec3 const& decay) noexcept; + void SetColorDecayAlpha (float alpha) noexcept; uint32_t GetEmissionCount (void) const noexcept; bool GetPassive (void) const noexcept; @@ -194,6 +210,12 @@ namespace SHADE SHVec4 const& GetColorTint (void) const noexcept; SHVec3 GetColorTintRGB (void) const noexcept; float GetColorTintAlpha (void) const noexcept; + SHVec4 const& GetColorTintRange (void) const noexcept; + SHVec3 GetColorTintRangeRGB (void) const noexcept; + float GetColorTintRangeAlpha (void) const noexcept; + SHVec4 const& GetColorDecay (void) const noexcept; + SHVec3 GetColorDecayRGB (void) const noexcept; + float GetColorDecayAlpha (void) const noexcept; /*-----------------------------------------------------------------------*/ /* NON-INTERFACE FUNCTIONS */ diff --git a/SHADE_Engine/src/Serialization/SHYAMLConverters.h b/SHADE_Engine/src/Serialization/SHYAMLConverters.h index de57e45d..a1c185aa 100644 --- a/SHADE_Engine/src/Serialization/SHYAMLConverters.h +++ b/SHADE_Engine/src/Serialization/SHYAMLConverters.h @@ -520,6 +520,8 @@ namespace YAML static constexpr std::string_view TEXTURE_ASSET_ID_TAG = "Texture Asset ID"; static constexpr std::string_view CUSTOM_UPDATE_SHADER_ASSET_ID_TAG = "Custom Update Shader Asset ID"; static constexpr std::string_view COLOR_TINT_TAG = "Color Tint"; + static constexpr std::string_view COLOR_TINT_RANGE_TAG = "Color Tint Range"; + static constexpr std::string_view COLOR_DECAY_TAG = "Color Decay"; static constexpr std::string_view ACCELERATION_TAG = "Acceleration"; static YAML::Node encode(SHParticleEmitterComponent const& rhs) @@ -541,6 +543,8 @@ namespace YAML node[TEXTURE_ASSET_ID_TAG.data()] = rhs.GetTextureAssetID(); node[CUSTOM_UPDATE_SHADER_ASSET_ID_TAG.data()] = rhs.GetCustomUpdateShaderAssetID(); node[COLOR_TINT_TAG.data()] = rhs.GetColorTint(); + node[COLOR_TINT_RANGE_TAG.data()] = rhs.GetColorTintRange(); + node[COLOR_DECAY_TAG.data()] = rhs.GetColorDecay(); node[ACCELERATION_TAG.data()] = rhs.GetAcceleration(); return node; @@ -591,6 +595,12 @@ namespace YAML if (node[COLOR_TINT_TAG.data()].IsDefined()) rhs.SetColorTint(node[COLOR_TINT_TAG.data()].as()); + if (node[COLOR_TINT_RANGE_TAG.data()].IsDefined()) + rhs.SetColorTintRange(node[COLOR_TINT_RANGE_TAG.data()].as()); + + if (node[COLOR_DECAY_TAG.data()].IsDefined()) + rhs.SetColorDecay(node[COLOR_DECAY_TAG.data()].as()); + if (node[ACCELERATION_TAG.data()].IsDefined()) rhs.SetAcceleration(node[ACCELERATION_TAG.data()].as()); From 3fc69890e4fd275f0ee790e45b5c3de3be3ce202 Mon Sep 17 00:00:00 2001 From: XiaoQiDigipen <72735604+XiaoQiDigipen@users.noreply.github.com> Date: Thu, 30 Mar 2023 14:24:21 +0800 Subject: [PATCH 2/9] Revert "Merge pull request #446 from SHADE-DP/Fix-ResourceHubCrashOnExit" This reverts commit 5ab7cbe5f36379d26db817666a796f257035afa0. --- .../MiddleEnd/Interface/SHGraphicsSystem.cpp | 53 +++++++++---------- .../MiddleEnd/Interface/SHGraphicsSystem.h | 2 +- 2 files changed, 26 insertions(+), 29 deletions(-) diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp index 4738b70c..21b08829 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp @@ -216,13 +216,13 @@ namespace SHADE } // Get render graph from default viewport world renderer - renderGraph = resourceManager->Create(); + renderGraph = resourceManager.Create(); /*-----------------------------------------------------------------------*/ /* WORLD RENDER GRAPH RESOURCES */ /*-----------------------------------------------------------------------*/ // Initialize world render graph - renderGraph->Init("World Render Graph", device, swapchain, resourceManager, renderContextCmdPools); + renderGraph->Init("World Render Graph", device, swapchain, &resourceManager, renderContextCmdPools); renderGraph->AddResource("Position", { SH_RENDER_GRAPH_RESOURCE_FLAGS::COLOR, SH_RENDER_GRAPH_RESOURCE_FLAGS::INPUT, SH_RENDER_GRAPH_RESOURCE_FLAGS::STORAGE }, true, windowDims.first, windowDims.second, vk::Format::eR32G32B32A32Sfloat); renderGraph->AddResource("Position World Space", { SH_RENDER_GRAPH_RESOURCE_FLAGS::COLOR, SH_RENDER_GRAPH_RESOURCE_FLAGS::INPUT, SH_RENDER_GRAPH_RESOURCE_FLAGS::STORAGE }, true, windowDims.first, windowDims.second, vk::Format::eR32G32B32A32Sfloat); renderGraph->AddResource("Object VFX", { SH_RENDER_GRAPH_RESOURCE_FLAGS::COLOR, SH_RENDER_GRAPH_RESOURCE_FLAGS::INPUT, SH_RENDER_GRAPH_RESOURCE_FLAGS::STORAGE }, true, windowDims.first, windowDims.second, vk::Format::eR32G32B32A32Sfloat); @@ -292,7 +292,7 @@ namespace SHADE /*-----------------------------------------------------------------------*/ /* SSAO PASS AND DATA INIT */ /*-----------------------------------------------------------------------*/ - ssaoStorage = resourceManager->Create(); + ssaoStorage = resourceManager.Create(); // command buffer operation to transfer data for ssao ssaoTransferCmdBuffer = graphicsCmdPool->RequestCommandBuffer(SH_CMD_BUFFER_TYPE::PRIMARY); @@ -475,7 +475,7 @@ namespace SHADE void SHGraphicsSystem::InitSubsystems(void) noexcept { - mousePickSubSystem = resourceManager->Create(); + mousePickSubSystem = resourceManager.Create(); std::vector> cmdPools; cmdPools.reserve(swapchain->GetNumImages()); @@ -486,28 +486,28 @@ namespace SHADE mousePickSubSystem->Init(device, cmdPools, renderGraph->GetRenderGraphResource("Entity ID")); // Register the post offscreen render to the system - postOffscreenRenderSubSystem = resourceManager->Create(); + postOffscreenRenderSubSystem = resourceManager.Create(); postOffscreenRenderSubSystem->Init(device, renderGraph->GetRenderGraphResource("Scene"), descPool); - lightingSubSystem = resourceManager->Create(); - lightingSubSystem->Init(device, descPool, resourceManager, samplerCache.GetSampler (device, SHVkSamplerParams + lightingSubSystem = resourceManager.Create(); + lightingSubSystem->Init(device, descPool, &resourceManager, samplerCache.GetSampler (device, SHVkSamplerParams { .addressMode = vk::SamplerAddressMode::eClampToBorder, }) ); - textRenderingSubSystem = resourceManager->Create(); + textRenderingSubSystem = resourceManager.Create(); // initialize the text renderer auto uiNode = renderGraph->GetNode(SHGraphicsConstants::RenderGraphEntityNames::SCREEN_SPACE_PASS.data()); textRenderingSubSystem->Init(device, uiNode->GetRenderpass(), uiNode->GetSubpass(SHGraphicsConstants::RenderGraphEntityNames::UI_TRANSLUCENT_SUBPASS), descPool, textVS, textFS); - trajectoryRenderingSubSystem = resourceManager->Create(); + trajectoryRenderingSubSystem = resourceManager.Create(); auto vfxPass = renderGraph->GetNode(SHGraphicsConstants::RenderGraphEntityNames::VFX_PASS.data()); // particle sub system initialization - particleSubSystem = resourceManager->Create(); + particleSubSystem = resourceManager.Create(); particleSubSystem->Init(device, descPool, vfxPass->GetRenderpass(), vfxPass->GetSubpass(SHGraphicsConstants::RenderGraphEntityNames::VFX_SUBPASS), particleVS, particleFS, particleEmitCS, particleUpdateCS); auto vfxNode = renderGraph->GetNode(SHGraphicsConstants::RenderGraphEntityNames::VFX_PASS.data()); @@ -608,9 +608,6 @@ namespace SHADE /*---------------------------------------------------------------------------------*/ void SHGraphicsSystem::Init(void) { - // Create resource manager - resourceManager = new SHResourceHub(); - InitBoilerplate(); InitMiddleEnd(); InitSubsystems(); @@ -870,7 +867,7 @@ namespace SHADE } // Create the renderer - auto renderer = resourceManager->Create(device, swapchain->GetNumImages(), descPool, projectionType); + auto renderer = resourceManager.Create(device, swapchain->GetNumImages(), descPool, projectionType); // Store renderers.emplace_back(renderer); @@ -914,7 +911,7 @@ namespace SHADE // Create new renderer for the light component and give it to the light component - Handle newRenderer = resourceManager->Create(device, swapchain->GetNumImages(), descPool, SHRenderer::PROJECTION_TYPE::ORTHOGRAPHIC); + Handle newRenderer = resourceManager.Create(device, swapchain->GetNumImages(), descPool, SHRenderer::PROJECTION_TYPE::ORTHOGRAPHIC); lightComp->SetRenderer(newRenderer); // Add the shadow map resource to the graph @@ -1061,7 +1058,7 @@ namespace SHADE auto shaderPair = std::make_pair(vertShader, fragShader); // Create material - auto mat = resourceManager->Create(); + auto mat = resourceManager.Create(); auto renderGraphNode = subpass->GetParentNode(); auto pipeline = renderGraphNode->GetOrCreatePipeline(std::make_pair(vertShader, fragShader), subpass); @@ -1075,12 +1072,12 @@ namespace SHADE void SHGraphicsSystem::RemoveMaterial(Handle material) { - resourceManager->Free(material); + resourceManager.Free(material); } Handle SHGraphicsSystem::AddOrGetBaseMaterialInstance(Handle material) { - return materialInstanceCache.CreateOrGet(*resourceManager, material); + return materialInstanceCache.CreateOrGet(resourceManager, material); } SHADE::Handle SHGraphicsSystem::AddOrGetBaseMaterialInstance() @@ -1090,17 +1087,17 @@ namespace SHADE SHADE::Handle SHGraphicsSystem::AddMaterialInstanceCopy(Handle materialInst) { - return resourceManager->Create(materialInst->GetBaseMaterial()); + return resourceManager.Create(materialInst->GetBaseMaterial()); } std::pair, typename SHResourceHub::dense_iterator> SHGraphicsSystem::GetAllMaterialInstances() { - return resourceManager->GetDenseAccess(); + return resourceManager.GetDenseAccess(); } void SHGraphicsSystem::RemoveMaterialInstance(Handle materialInstance) { - resourceManager->Free(materialInstance); + resourceManager.Free(materialInstance); } /*---------------------------------------------------------------------------------*/ @@ -1192,12 +1189,12 @@ namespace SHADE /*---------------------------------------------------------------------------------*/ Handle SHGraphicsSystem::AddFont(SHFontAsset const& fontAsset) noexcept { - return fontLibrary.AddFont(device, *resourceManager, fontAsset); + return fontLibrary.AddFont(device, resourceManager, fontAsset); } void SHGraphicsSystem::BuildFonts(void) noexcept { - fontLibrary.BuildFonts(device, graphicsQueue, graphicsCmdPool, descPool, SHGraphicsPredefinedData::GetPredefinedDescSetLayouts(SHGraphicsPredefinedData::PredefinedDescSetLayoutTypes::FONT)[0], *resourceManager); + fontLibrary.BuildFonts(device, graphicsQueue, graphicsCmdPool, descPool, SHGraphicsPredefinedData::GetPredefinedDescSetLayouts(SHGraphicsPredefinedData::PredefinedDescSetLayoutTypes::FONT)[0], resourceManager); } #pragma endregion ADD_REMOVE @@ -1241,7 +1238,7 @@ namespace SHADE // Reset all material isDirty auto gfxSystem = reinterpret_cast(system); - auto [matBegin, matEnd] = gfxSystem->resourceManager->GetDenseAccess(); + auto [matBegin, matEnd] = gfxSystem->resourceManager.GetDenseAccess(); for (auto iter = matBegin; iter != matEnd; ++iter) { iter->ClearChangeFlag(); @@ -1259,7 +1256,7 @@ namespace SHADE // Clean up and update all materials auto gfxSystem = reinterpret_cast(system); - auto [matInstBegin, matInstEnd] = gfxSystem->resourceManager->GetDenseAccess(); + auto [matInstBegin, matInstEnd] = gfxSystem->resourceManager.GetDenseAccess(); for (auto iter = matInstBegin; iter != matInstEnd; ++iter) { auto baseMat = iter->GetBaseMaterial(); @@ -1312,7 +1309,7 @@ namespace SHADE // Unset all material old pipeline since we would have finished processing auto gfxSystem = reinterpret_cast(system); - auto [matBegin, matEnd] = gfxSystem->resourceManager->GetDenseAccess(); + auto [matBegin, matEnd] = gfxSystem->resourceManager.GetDenseAccess(); for (auto iter = matBegin; iter != matEnd; ++iter) { iter->ForgetOldPipeline(); @@ -1452,7 +1449,7 @@ namespace SHADE Handle SHGraphicsSystem::createDebugDrawPipeline(Handle renderPass, Handle subpass, bool filled, bool triMesh, bool instanced) { - auto pipelineLayout = resourceManager->Create + auto pipelineLayout = resourceManager.Create ( device, SHPipelineLayoutParams { @@ -1460,7 +1457,7 @@ namespace SHADE .predefinedDescSetLayouts = SHGraphicsPredefinedData::GetSystemData(SHGraphicsPredefinedData::SystemType::BATCHING).descSetLayouts } ); - auto pipeline = resourceManager->Create(device, pipelineLayout, nullptr, renderPass, subpass); + auto pipeline = resourceManager.Create(device, pipelineLayout, nullptr, renderPass, subpass); pipeline->GetPipelineState().SetRasterizationState(SHRasterizationState { .polygonMode = filled ? vk::PolygonMode::eFill : vk::PolygonMode::eLine, diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.h b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.h index aff756cd..3d0b3cc6 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.h +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.h @@ -440,7 +440,7 @@ namespace SHADE SHWindow* window = nullptr; // Middle End Resources - SHResourceHub* resourceManager; + SHResourceHub resourceManager; SHMeshLibrary meshLibrary; SHTextureLibrary texLibrary; SHGraphicsGenericData graphicsGenericData; From 12bbce33e86e3aa8dcc221cdc9461da0feb07779 Mon Sep 17 00:00:00 2001 From: maverickdgg Date: Thu, 30 Mar 2023 16:56:41 +0800 Subject: [PATCH 3/9] Slider WIP --- Assets/Materials/UIMat_SliderBG.shmat | 8 ++ Assets/Materials/UIMat_SliderBG.shmat.shmeta | 3 + Assets/Materials/UIMat_Slider_SFX.shmat | 11 +++ .../Materials/UIMat_Slider_SFX.shmat.shmeta | 3 + Assets/Materials/UIMat_Slider_Textured.shmat | 6 +- Assets/Scenes/MainMenu.shade | 78 +++++++++++++----- Assets/Shaders/UI_Slider_Textured_FS.glsl | 18 ++-- .../Shaders/UI_Slider_Textured_FS.shshaderb | Bin 2717 -> 3225 bytes Assets/Texture/UI/slider_bg.dds | Bin 0 -> 87696 bytes Assets/Texture/UI/slider_bg.shtex | Bin 0 -> 87632 bytes Assets/Texture/UI/slider_bg.shtex.shmeta | 3 + Assets/Texture/UI/slider_fill_black.dds | Bin 0 -> 48320 bytes Assets/Texture/UI/slider_fill_black.shtex | Bin 0 -> 48216 bytes .../Texture/UI/slider_fill_black.shtex.shmeta | 3 + 14 files changed, 104 insertions(+), 29 deletions(-) create mode 100644 Assets/Materials/UIMat_SliderBG.shmat create mode 100644 Assets/Materials/UIMat_SliderBG.shmat.shmeta create mode 100644 Assets/Materials/UIMat_Slider_SFX.shmat create mode 100644 Assets/Materials/UIMat_Slider_SFX.shmat.shmeta create mode 100644 Assets/Texture/UI/slider_bg.dds create mode 100644 Assets/Texture/UI/slider_bg.shtex create mode 100644 Assets/Texture/UI/slider_bg.shtex.shmeta create mode 100644 Assets/Texture/UI/slider_fill_black.dds create mode 100644 Assets/Texture/UI/slider_fill_black.shtex create mode 100644 Assets/Texture/UI/slider_fill_black.shtex.shmeta diff --git a/Assets/Materials/UIMat_SliderBG.shmat b/Assets/Materials/UIMat_SliderBG.shmat new file mode 100644 index 00000000..2b41f3b3 --- /dev/null +++ b/Assets/Materials/UIMat_SliderBG.shmat @@ -0,0 +1,8 @@ +- VertexShader: 46580970 + FragmentShader: 35983630 + SubPass: UI + Properties: + data.color: {x: 1, y: 1, z: 1, w: 1} + data.textureIndex: 64816540 + data.alpha: 1 + data.beta: {x: 1, y: 1, z: 1} \ No newline at end of file diff --git a/Assets/Materials/UIMat_SliderBG.shmat.shmeta b/Assets/Materials/UIMat_SliderBG.shmat.shmeta new file mode 100644 index 00000000..bd447de8 --- /dev/null +++ b/Assets/Materials/UIMat_SliderBG.shmat.shmeta @@ -0,0 +1,3 @@ +Name: UIMat_SliderBG +ID: 117587364 +Type: 7 diff --git a/Assets/Materials/UIMat_Slider_SFX.shmat b/Assets/Materials/UIMat_Slider_SFX.shmat new file mode 100644 index 00000000..a3f3b506 --- /dev/null +++ b/Assets/Materials/UIMat_Slider_SFX.shmat @@ -0,0 +1,11 @@ +- VertexShader: 46580970 + FragmentShader: 43211183 + SubPass: UI + Properties: + data.color: {x: 1, y: 1, z: 1, w: 1} + data.textureIndex: 50370514 + data.alpha: 1 + data.beta: {x: 1, y: 1, z: 1} + data.sliderThreshold: 1 + data.sliderStartColor: {x: 0.949000001, y: 0.689999998, z: 0.211999997, w: 1} + data.sliderBarColor: {x: 1, y: 1, z: 1, w: 1} \ No newline at end of file diff --git a/Assets/Materials/UIMat_Slider_SFX.shmat.shmeta b/Assets/Materials/UIMat_Slider_SFX.shmat.shmeta new file mode 100644 index 00000000..b6e88495 --- /dev/null +++ b/Assets/Materials/UIMat_Slider_SFX.shmat.shmeta @@ -0,0 +1,3 @@ +Name: UIMat_Slider_SFX +ID: 122820018 +Type: 7 diff --git a/Assets/Materials/UIMat_Slider_Textured.shmat b/Assets/Materials/UIMat_Slider_Textured.shmat index cb09a99e..ba0cc52e 100644 --- a/Assets/Materials/UIMat_Slider_Textured.shmat +++ b/Assets/Materials/UIMat_Slider_Textured.shmat @@ -3,7 +3,9 @@ SubPass: UI Properties: data.color: {x: 1, y: 1, z: 1, w: 1} - data.textureIndex: 51995224 + data.textureIndex: 50370514 data.alpha: 1 data.beta: {x: 1, y: 1, z: 1} - data.sliderThreshold: 1 \ No newline at end of file + data.sliderThreshold: 1 + data.sliderStartColor: {x: 0.254901886, y: 0.321500003, z: 0.909799993, w: 1} + data.sliderBarColor: {x: 1, y: 1, z: 1, w: 1} \ No newline at end of file diff --git a/Assets/Scenes/MainMenu.shade b/Assets/Scenes/MainMenu.shade index c85eee83..708089eb 100644 --- a/Assets/Scenes/MainMenu.shade +++ b/Assets/Scenes/MainMenu.shade @@ -1,14 +1,14 @@ - NavData: 0 - EID: 0 Name: Main Menu Canvas - IsActive: true + IsActive: false NumberOfChildren: 3 Components: Canvas Component: Canvas Width: 1920 Canvas Height: 1080 Scale by canvas width: false - IsActive: true + IsActive: false Scripts: ~ - EID: 1 Name: BackGround @@ -38,7 +38,7 @@ Transform Component: Translate: {x: 0, y: 100, z: 0.300000012} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 600, y: 600, z: 1.18585491} + Scale: {x: 631.577454, y: 631.577454, z: 1.24826539} IsActive: true Renderable Component: Mesh: 141771688 @@ -258,7 +258,7 @@ Transform Component: Translate: {x: 450, y: 0, z: 0.400000006} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 400, y: 100, z: 1} + Scale: {x: 389.627228, y: 97.4068069, z: 0.974068105} IsActive: true Renderable Component: Mesh: 141771688 @@ -533,14 +533,14 @@ Enabled: true - EID: 19 Name: Options Canvas - IsActive: false + IsActive: true NumberOfChildren: 12 Components: Canvas Component: Canvas Width: 1920 Canvas Height: 1080 Scale by canvas width: false - IsActive: false + IsActive: true Scripts: - Type: SHADE_Scripting.UI.Options Enabled: true @@ -749,16 +749,16 @@ - EID: 29 Name: Master Volume Slider IsActive: true - NumberOfChildren: 0 + NumberOfChildren: 1 Components: Transform Component: Translate: {x: 0, y: 0, z: 0} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1000, y: 75, z: 1} + Scale: {x: 1024, y: 64, z: 1} IsActive: true Renderable Component: Mesh: 141771688 - Material: 128676209 + Material: 127128823 IsActive: true Slider Component: Slider Value: 1 @@ -771,19 +771,39 @@ Clicked: false IsActive: true Scripts: ~ -- EID: 30 - Name: SFX Volume Slider +- EID: 437 + Name: Slider BG IsActive: true NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 0, y: -100, z: 0} + Translate: {x: 0, y: 0, z: 0.100000001} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1000, y: 75, z: 1} + Scale: {x: 1.01999998, y: 1.20000005, z: 1} IsActive: true Renderable Component: Mesh: 141771688 - Material: 128676209 + Material: 117587364 + IsActive: true + UI Component: + Canvas ID: 19 + Hovered: false + Clicked: false + IsActive: true + Scripts: ~ +- EID: 30 + Name: SFX Volume Slider + IsActive: true + NumberOfChildren: 1 + Components: + Transform Component: + Translate: {x: 0, y: -100, z: 0} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 1024, y: 64, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 122820018 IsActive: true Slider Component: Slider Value: 1 @@ -796,6 +816,26 @@ Clicked: false IsActive: true Scripts: ~ +- EID: 436 + Name: Slider BG + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0, z: 0.100000001} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 1.01999998, y: 1.20000005, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 117587364 + IsActive: true + UI Component: + Canvas ID: 19 + Hovered: false + Clicked: false + IsActive: true + Scripts: ~ - EID: 31 Name: BGM Volume Slider IsActive: true @@ -956,7 +996,7 @@ Material: 128676209 IsActive: true Slider Component: - Slider Value: 1 + Slider Value: 0.889483869 Min Value: 30 Max Value: 120 IsActive: true @@ -1142,7 +1182,7 @@ Scale: {x: 75, y: 75, z: 1} IsActive: true Text Renderer Component: - Text: 100 + Text: 60 Font: 174412429 Color: {x: 0, y: 0, z: 0, w: 1} Text Size: {x: 1, y: 1, z: 1} @@ -1504,14 +1544,14 @@ sceneID: 88928066 - EID: 450 Name: TransitionCanvas - IsActive: true + IsActive: false NumberOfChildren: 1 Components: Canvas Component: Canvas Width: 1920 Canvas Height: 1080 Scale by canvas width: false - IsActive: true + IsActive: false Scripts: ~ - EID: 65982 Name: Transition @@ -1535,6 +1575,6 @@ Scripts: - Type: SHADE_Scripting.UI.SceneFadeInOut Enabled: true - alphaValue: 1 + alphaValue: 0 fadeInTime: 0.5 fadeOutTime: 0.5 \ No newline at end of file diff --git a/Assets/Shaders/UI_Slider_Textured_FS.glsl b/Assets/Shaders/UI_Slider_Textured_FS.glsl index 9f7945ce..cddf57d9 100644 --- a/Assets/Shaders/UI_Slider_Textured_FS.glsl +++ b/Assets/Shaders/UI_Slider_Textured_FS.glsl @@ -42,19 +42,21 @@ layout(location = 1) out uint outEntityID; void main() { //fragColor = texture(textures[nonuniformEXT(MatProp.data[In2.materialIndex].textureIndex)], In.uv); - - if (In.uv.x > MatProp.data[In2.materialIndex].sliderThreshold) - fragColor = MatProp.data[In2.materialIndex].sliderBarColor; - else - //fragColor = (1.0f - In.uv.x) * MatProp.data[In2.materialIndex].sliderStartColor + In.uv.x * MatProp.data[In2.materialIndex].sliderEndColor; - fragColor = texture(textures[nonuniformEXT(MatProp.data[In2.materialIndex].textureIndex)], In.uv); - - + fragColor = texture(textures[nonuniformEXT(MatProp.data[In2.materialIndex].textureIndex)], In.uv); if (fragColor.a < 0.01f) { discard; } + if (In.uv.x > MatProp.data[In2.materialIndex].sliderThreshold) + fragColor = MatProp.data[In2.materialIndex].sliderBarColor; + + if (fragColor.xyz == vec3(0.0f, 0.0f, 0.0f)) + fragColor.xyz = MatProp.data[In2.materialIndex].sliderStartColor.xyz; + + + + fragColor.a = MatProp.data[In2.materialIndex].alpha; // fragColor.a = 1.0f; diff --git a/Assets/Shaders/UI_Slider_Textured_FS.shshaderb b/Assets/Shaders/UI_Slider_Textured_FS.shshaderb index db7f7c704737aea741a2ec4077088ba0b2eba44e..6b024f23be8fb76ec046b2747fb6350997024498 100644 GIT binary patch literal 3225 zcmZ9MZF3V<6vvk)Eu{z)pc-k5j9iwnp*?hOg? za{lAVg8$_Bui|6gsJFRs+h4o8Xc_&H7v~YtAiR zm?!m7uas9H_c8B~R~CnMf+)doNHi&$6}3g<^2e?QC6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F$f#Dg~UTS|?u8~S7_y8a9gL4Dt+u#8_fCuovMF1Ya z19;%vK>q+9EPo!P^{`#7s@3C_*2}f)TswL3gSXQ9+C-H?W6cA{v+?;RzWD3;3+wlV z?WU1pe(dHox;2$zAkPaJd!{od&ke}7@6c@jl>V&~`da?_A|Iq$MX&f3UcsxC#zT8B z&a18+-)yim_pRyh?P<;D1H0}`@_9Lu>y7&E^OG+Ba_pUgE-!{*V7J`7QJ1>UTWRrP zf5?X}0*MQ_{_Mg*e_jQF9?(M;ftA1qyX8o(Uv@-yN%u$U`ybc8luMomP>$os1|Ju4 zH^qKA`uFmOhbkC&=mnwSARay(_yaxQhZf_bHP!saq3aH)i&eh%U=W)*=l9_od~*>{ zeV_*yjnps1gLt?I;1BrFYCJeJYbR^=T#ss4^?PV`x^8Eh>d@6Y(y?)qT=(_El)&6g`J9^!Wy|8vy_ zw|~~$T3s{tZuWe!Ak^h1SK$2K3O)WSP0#F)Iys###H+;5ro%sfU!eBN{R7$a`sMop zZGN&pkS7S~CtPTK;+q9`g~Z3^_vMe7RsML}yxC}OEXea7IsWaSe>vW!f9Op={^y0? zj@9gR`+OhA3%?DX?y*z;d8;Q*His2_^Ynii+b2%i$*wt{fBMhn8r9vL|NpP;(|^hp i**WiT&dy)IIXi#(S=+a2?)%T$_1g6R@2u^Z*Zv2;GTUtc literal 0 HcmV?d00001 diff --git a/Assets/Texture/UI/slider_bg.shtex b/Assets/Texture/UI/slider_bg.shtex new file mode 100644 index 0000000000000000000000000000000000000000..184df4ae6ffb89bd3fd75f9077e30de4e25da65f GIT binary patch literal 87632 zcmeI5Z-^ZA8OMLKdlT(R%|_gch}?>ymlr~lH$g$U@l8p%Dg)gueR&tqxdFxDciJB1i`)Y65LDf`tx~a=J|PdkzOSn zxxM`i%qG8^o!yydp6}=TduDz!Tlq!g+<{BHzGG7^BI}{ zCG)(@PS=g?{l&lEvt8*-ADY|$;-}urS2SYh-ND;_E+3V(<>PBpzg+aiq~9>xK5I=` zL#8-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-~W34`ucr+yX&NwpSg3VZcU>a$@2nc zemhu_=LQtpcWPy9QU9+K`L*@)3qQznm3&37@CsgSHy-+vX<75y_~xS{rGL1A&|XqM zKm6<@lu5y(`)^=AtQ{dr9Y z@_~FPBCs9!;18TBjmeJaF6sVAegE&>&y=#~0o2np@zFb#(j947PX34VhliRl@GvBV zhJ$#7aG($J0X_5>AH8dq_fFjUhN@W8*Po11x9a>pe1mTm0nHEc!J?7tg?JDTivaq7 z552~NQ!9R<<*$xt4r~6NT3KrQW$xd%c=X!wWPA0<LksJKnm1R6&uHUZv!O_D9 zPh|HOL~&g82jrNRn~^Q=wf$pz;j={mKEr2tU}~Vh){i{M{M_xh&-{GJjs0c#(foNm ziTnWYwf6%oG*8&`e4=VY`U^GpcJp0ZU(X*n*BrDq`a)k8fqv8%`EN%beiGbEROZLi=&SnWc8iDTUB>_1yvO#>yL*~DXI?9wFBZkR z+?6Vv-`l3gf4k)~`=d(Er|;rbre`-0p1&_pd+wpb#q;{*_W^x*VJwm-2P|7_1+mMgNW-rrqWyMA|N?eZ&r UbjRxVU-7%O8NTm|A6V1=22yq05dZ)H literal 0 HcmV?d00001 diff --git a/Assets/Texture/UI/slider_bg.shtex.shmeta b/Assets/Texture/UI/slider_bg.shtex.shmeta new file mode 100644 index 00000000..833cf676 --- /dev/null +++ b/Assets/Texture/UI/slider_bg.shtex.shmeta @@ -0,0 +1,3 @@ +Name: slider_bg +ID: 64816540 +Type: 3 diff --git a/Assets/Texture/UI/slider_fill_black.dds b/Assets/Texture/UI/slider_fill_black.dds new file mode 100644 index 0000000000000000000000000000000000000000..2d6c96c048d037c03dd81e3834a9fed092b9197c GIT binary patch literal 48320 zcmeI4O=}ZT6o#kT+HQ&$U5a#E6a_)tv>O*utV$7Ax)4;FW^L*pP*Q(E>MzK`MK?mL zi+~_ZS5gp+J1bdS7XcB3X{ky}Kd$%Q$(fmksAvD@L} zAPD-^Kybl6emfcjm*3b8d+V|H@mp7JT(kG_t2h0=Km7>p!CreGyL)G3*XOBS_V#t` z>!_8kmz(v;^YSbe*UK;78I#s?#Z_Z(QtNopm1!OH`I1@$LJ#@_f4~EHkSG8T;UPSP zhwu;{It9oB^56jHfo_=dV`BTX4gC?(Md3z0nW-oC5f%tpNG$ z4M9K94_*QMfFH;Q@=*c-9>4>501tk{0~OD1Ett)ZayX3EBC}OPFA)TO!cX`K58y$f z06c_;@DLutLwM*EAP>j`@}O&Zpytg=#cUJ=zq++X|IvS4>pyt!?S|e0Ao3sn!e4j* z4-y67Av}bK@DLutL#u#}&5rN4o0%gQgJZdW98X@57vu$bL0*s-P66_OJRlFq1M+}8 zAP>kx&Ih`BJ}{$=DVX&k!LN!os^XT0|2b-Dy(k;JXf?n10dggw* zm-XrD`f$GNGk8=KTBynt(_gJo9V0IgA?Sy_6O(xe)(8GF*JV0 z&+rT$z=K2qcnA;SAv}bK@X#snk9ja1dz|)5J1K2ePd>}8pNGTq<^22|bj;^_t&7oU zHoV(6wV$uAj>wzaN8K{j%-nW|`}=aosnLUe$Qc5Ez=vErz(@E9A9IF)kMJ?q4)75^ o!pEE;;NySANBjTWO*)L*Wm0pdb|SZ2DmwEpz4-0+?{Oag1sSeH&Hw-a literal 0 HcmV?d00001 diff --git a/Assets/Texture/UI/slider_fill_black.shtex b/Assets/Texture/UI/slider_fill_black.shtex new file mode 100644 index 0000000000000000000000000000000000000000..eb0ebf6e2e1002bd10ab7dc8554eb81770ef63a6 GIT binary patch literal 48216 zcmeI5PiqrF7{<41)Jt*Dqe$07Q4qw7y?BTxzl2KDoK5`%l6v%%_z80G;6-Tl5D&+~hBvPpaMRTOg7<-XfryFj}=cwdIW)TQI@CW&T z2k;^Hw-7>h|5u`qzBBo$dPi!lpbv zI$%9MxjnYeKfh4z$@5j`V=H_;^5oPg_6K^P2Yw(A!b^An58wejfCpm*SbupS;s^ZT z6(A4f!73m;P`cbN2eVy&&vqY<)@A$T`n-~zKffW{mEPz$L1pIn)2V?T_+hL7yd@9t zfPN4l!UK2!58wej$P|Ew@DLsznun@W-)aT=`Omk%D9*pz_4@Ls*Xf?%hV{9R+oAPF zKlF17kf*T%^tTTLe!vf20rEf|=m+{y3IQI#19$)re!&BkJ{_%_;d|K}C)HIkSPEU;UPSPhwu;{ItAzh`hY%|S|6x2)32M|vfx+uw(%eSo0|XNy^kAu z3xMc<_zQpG0X)bQfQRr99>PO-2oJ3SIyL*g-)@@6u0ASdAv}bK@DLtOg@;XTOxf(riQFpLZJ4+B`Tn{HLLbpb^bvgo52n&beBQ?6 zmb{TS^5zua_>1E&j=$&w`oJp?C+6E+eb^B>RC;T9uu#1%GrZ*Z$ti#z#tLx!-~)jl z@Pk)?Jdg+afqs-ifCumZ9>4>5kSTD)JY3X`2Opl#c17OF|Lnd;|M>B zAV<7Ecz*KX?Vm19`9tz=MC22X@DvzWnaVrDFf) zx3U|h{c}9uUh1}M`FdXIoilsitNFa5U0fQ&{8{kB2||9v5cmNASdAv}bK z@DLutL#F_J@L%`AO6q_8Q-TAf&EVYQ;{16$zg7#^-;?Lle|N4V3&rByzNr0tedD^k zxc#YnrcuDz-r@WiY-dIf{160!e87jm4)75^!p9&G@DV-+c7TuY5k3ZifRBF^AMM|B fH~C`R?k2TrT4#gZrIL&H@{`~0{)zMD2hBeK$mc&< literal 0 HcmV?d00001 diff --git a/Assets/Texture/UI/slider_fill_black.shtex.shmeta b/Assets/Texture/UI/slider_fill_black.shtex.shmeta new file mode 100644 index 00000000..4f9bc718 --- /dev/null +++ b/Assets/Texture/UI/slider_fill_black.shtex.shmeta @@ -0,0 +1,3 @@ +Name: slider_fill_black +ID: 50370514 +Type: 3 From c2a8c86483fe86f6544d17f10728d6bb3b1e3303 Mon Sep 17 00:00:00 2001 From: maverickdgg Date: Thu, 30 Mar 2023 17:09:18 +0800 Subject: [PATCH 4/9] Slider textures updated --- Assets/Materials/UIMat_Slider_BGM.shmat | 11 ++++ .../Materials/UIMat_Slider_BGM.shmat.shmeta | 3 + Assets/Materials/UIMat_Slider_FOV.shmat | 11 ++++ .../Materials/UIMat_Slider_FOV.shmat.shmeta | 3 + Assets/Scenes/MainMenu.shade | 64 +++++++++++++++---- 5 files changed, 80 insertions(+), 12 deletions(-) create mode 100644 Assets/Materials/UIMat_Slider_BGM.shmat create mode 100644 Assets/Materials/UIMat_Slider_BGM.shmat.shmeta create mode 100644 Assets/Materials/UIMat_Slider_FOV.shmat create mode 100644 Assets/Materials/UIMat_Slider_FOV.shmat.shmeta diff --git a/Assets/Materials/UIMat_Slider_BGM.shmat b/Assets/Materials/UIMat_Slider_BGM.shmat new file mode 100644 index 00000000..5ca73ad4 --- /dev/null +++ b/Assets/Materials/UIMat_Slider_BGM.shmat @@ -0,0 +1,11 @@ +- VertexShader: 46580970 + FragmentShader: 43211183 + SubPass: UI + Properties: + data.color: {x: 1, y: 1, z: 1, w: 1} + data.textureIndex: 50370514 + data.alpha: 1 + data.beta: {x: 1, y: 1, z: 1} + data.sliderThreshold: 1 + data.sliderStartColor: {x: 0.36500001, y: 0.783999979, z: 0.878000021, w: 1} + data.sliderBarColor: {x: 1, y: 1, z: 1, w: 1} \ No newline at end of file diff --git a/Assets/Materials/UIMat_Slider_BGM.shmat.shmeta b/Assets/Materials/UIMat_Slider_BGM.shmat.shmeta new file mode 100644 index 00000000..bca563e0 --- /dev/null +++ b/Assets/Materials/UIMat_Slider_BGM.shmat.shmeta @@ -0,0 +1,3 @@ +Name: UIMat_Slider_BGM +ID: 129354037 +Type: 7 diff --git a/Assets/Materials/UIMat_Slider_FOV.shmat b/Assets/Materials/UIMat_Slider_FOV.shmat new file mode 100644 index 00000000..bc121a46 --- /dev/null +++ b/Assets/Materials/UIMat_Slider_FOV.shmat @@ -0,0 +1,11 @@ +- VertexShader: 46580970 + FragmentShader: 43211183 + SubPass: UI + Properties: + data.color: {x: 1, y: 1, z: 1, w: 1} + data.textureIndex: 50370514 + data.alpha: 1 + data.beta: {x: 1, y: 1, z: 1} + data.sliderThreshold: 1 + data.sliderStartColor: {x: 0.624000013, y: 0.211999997, z: 0.949000001, w: 1} + data.sliderBarColor: {x: 1, y: 1, z: 1, w: 1} \ No newline at end of file diff --git a/Assets/Materials/UIMat_Slider_FOV.shmat.shmeta b/Assets/Materials/UIMat_Slider_FOV.shmat.shmeta new file mode 100644 index 00000000..86114830 --- /dev/null +++ b/Assets/Materials/UIMat_Slider_FOV.shmat.shmeta @@ -0,0 +1,3 @@ +Name: UIMat_Slider_FOV +ID: 117651669 +Type: 7 diff --git a/Assets/Scenes/MainMenu.shade b/Assets/Scenes/MainMenu.shade index 708089eb..64904465 100644 --- a/Assets/Scenes/MainMenu.shade +++ b/Assets/Scenes/MainMenu.shade @@ -1,14 +1,14 @@ - NavData: 0 - EID: 0 Name: Main Menu Canvas - IsActive: false + IsActive: true NumberOfChildren: 3 Components: Canvas Component: Canvas Width: 1920 Canvas Height: 1080 Scale by canvas width: false - IsActive: false + IsActive: true Scripts: ~ - EID: 1 Name: BackGround @@ -533,14 +533,14 @@ Enabled: true - EID: 19 Name: Options Canvas - IsActive: true + IsActive: false NumberOfChildren: 12 Components: Canvas Component: Canvas Width: 1920 Canvas Height: 1080 Scale by canvas width: false - IsActive: true + IsActive: false Scripts: - Type: SHADE_Scripting.UI.Options Enabled: true @@ -779,7 +779,7 @@ Transform Component: Translate: {x: 0, y: 0, z: 0.100000001} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1.01999998, y: 1.20000005, z: 1} + Scale: {x: 1.02499998, y: 1.25, z: 1} IsActive: true Renderable Component: Mesh: 141771688 @@ -824,7 +824,7 @@ Transform Component: Translate: {x: 0, y: 0, z: 0.100000001} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1.01999998, y: 1.20000005, z: 1} + Scale: {x: 1.02499998, y: 1.25, z: 1} IsActive: true Renderable Component: Mesh: 141771688 @@ -839,16 +839,16 @@ - EID: 31 Name: BGM Volume Slider IsActive: true - NumberOfChildren: 0 + NumberOfChildren: 1 Components: Transform Component: Translate: {x: 0, y: -200, z: 0} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1000, y: 75, z: 1} + Scale: {x: 1024, y: 64, z: 1} IsActive: true Renderable Component: Mesh: 141771688 - Material: 128676209 + Material: 129354037 IsActive: true Slider Component: Slider Value: 1 @@ -861,6 +861,26 @@ Clicked: false IsActive: true Scripts: ~ +- EID: 435 + Name: Slider BG + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0, z: 0.100000001} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 1.02499998, y: 1.25, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 117587364 + IsActive: true + UI Component: + Canvas ID: 19 + Hovered: false + Clicked: false + IsActive: true + Scripts: ~ - EID: 32 Name: Camera Title Text IsActive: true @@ -984,16 +1004,16 @@ - EID: 37 Name: FOV Slider IsActive: true - NumberOfChildren: 0 + NumberOfChildren: 1 Components: Transform Component: Translate: {x: 0, y: 0, z: 0} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1000, y: 75, z: 1} + Scale: {x: 1024, y: 64, z: 1} IsActive: true Renderable Component: Mesh: 141771688 - Material: 128676209 + Material: 117651669 IsActive: true Slider Component: Slider Value: 0.889483869 @@ -1006,6 +1026,26 @@ Clicked: false IsActive: true Scripts: ~ +- EID: 434 + Name: Slider BG + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0, z: 0.100000001} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 1.02499998, y: 1.25, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 117587364 + IsActive: true + UI Component: + Canvas ID: 19 + Hovered: false + Clicked: false + IsActive: true + Scripts: ~ - EID: 448 Name: Invert X Toggle Button IsActive: true From 4d145bbc43e27007303862a32a22dd9499caf866 Mon Sep 17 00:00:00 2001 From: Brandon Mak Date: Thu, 30 Mar 2023 19:15:03 +0800 Subject: [PATCH 5/9] Added support for custom VS and FS for particles --- Assets/Scenes/Scene2.shade | 8 +- Assets/Shaders/ParticleRounded_FS.glsl | 27 +++++ Assets/Shaders/ParticleRounded_FS.shshaderb | Bin 0 -> 1513 bytes .../ParticleRounded_FS.shshaderb.shmeta | 3 + Assets/Shaders/ParticleRounded_VS.glsl | 107 ++++++++++++++++++ Assets/Shaders/ParticleRounded_VS.shshaderb | Bin 0 -> 7377 bytes .../ParticleRounded_VS.shshaderb.shmeta | 3 + .../Inspector/SHEditorComponentView.hpp | 82 ++++++++++++++ .../Particles/SHParticleEmitterComponent.cpp | 40 +++++++ .../Particles/SHParticleEmitterComponent.h | 81 ++++++++----- .../Particles/SHParticleSubSystem.cpp | 81 ++++++++++++- .../MiddleEnd/Particles/SHParticleSubSystem.h | 12 +- .../src/Serialization/SHYAMLConverters.h | 29 +++++ 13 files changed, 436 insertions(+), 37 deletions(-) create mode 100644 Assets/Shaders/ParticleRounded_FS.glsl create mode 100644 Assets/Shaders/ParticleRounded_FS.shshaderb create mode 100644 Assets/Shaders/ParticleRounded_FS.shshaderb.shmeta create mode 100644 Assets/Shaders/ParticleRounded_VS.glsl create mode 100644 Assets/Shaders/ParticleRounded_VS.shshaderb create mode 100644 Assets/Shaders/ParticleRounded_VS.shshaderb.shmeta diff --git a/Assets/Scenes/Scene2.shade b/Assets/Scenes/Scene2.shade index 6e794990..4f925833 100644 --- a/Assets/Scenes/Scene2.shade +++ b/Assets/Scenes/Scene2.shade @@ -172,10 +172,12 @@ Rotation Speed: 0.0309999995 Rotation Decay: 0.0199999996 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 44202416 + Custom Fragment Shader Asset ID: 42315398 Custom Update Shader Asset ID: 0 - Color Tint: {x: 0, y: 1, z: 0.56387639, w: 1} - Color Tint Range: {x: 0.5, y: 0.5, z: 0.5, w: 0} - Color Decay: {x: 0, y: 0, z: 0, w: 0} + Color Tint: {x: 0.46696043, y: 1, z: 0, w: 1} + Color Tint Range: {x: 1, y: 0, z: 0, w: 0} + Color Decay: {x: -1, y: -1, z: -1, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: ~ \ No newline at end of file diff --git a/Assets/Shaders/ParticleRounded_FS.glsl b/Assets/Shaders/ParticleRounded_FS.glsl new file mode 100644 index 00000000..6de4dc8b --- /dev/null +++ b/Assets/Shaders/ParticleRounded_FS.glsl @@ -0,0 +1,27 @@ +#version 460 core +#extension GL_EXT_nonuniform_qualifier : require + +layout (location = 0) out vec4 fragColor; + +layout (set = 0, binding = 1) uniform sampler2D textures[]; // for textures (global) + +// between shader stages +layout(location = 0) in struct +{ + vec2 uv; // location = 0 +} In; + +// material stuff +layout(location = 1) flat in struct +{ + uint textureIndex; + vec4 color; +} InFlat; + +void main () +{ + fragColor = vec4 (texture(textures [nonuniformEXT(InFlat.textureIndex)], In.uv)) * InFlat.color; + + if (fragColor.a < 0.01f) + discard; +} diff --git a/Assets/Shaders/ParticleRounded_FS.shshaderb b/Assets/Shaders/ParticleRounded_FS.shshaderb new file mode 100644 index 0000000000000000000000000000000000000000..59049d0c1cc9d068cc27942f802b250d3523f06c GIT binary patch literal 1513 zcmYk6>uM8W5Qe`t2Wx6i_N3Ovr14yhRohbV03tO60Ue@jRs=_K;QQ=;8}q?rX5Kl^ESdk2Gx5tzR?ZkRVG3r(>?M#{Fq1+|%s(w9{Ilg> z#S3Q2G!I`p`)^-49e2LBV=w|BNkJ!>*?1#-_R zM^+pxj?7SPce6Q=dq3i|h zwS$9NW8Z1_`_3SG@4Jrg1+LTaLbn}xC+;YZ_49(ZKkSS<=_??k%>)h7bJhwo$EO+g%gdK!PJz9!FU8Sq<| zd`=vl+%w`lFmj_aD{oo)oOlUEuPB{6fYA%_3*yuPCmx+0ff2tbUb6b8)wQnp5x;D0 zNu8|bNgn;Ni_7B7#-57mox6e&o8AG8+UVSw+Sp50#y_on%VOAXTbWs~(?eCnUa{Y^ zGWD^;ABYOyE034d(L>3*`Zno}Tk(kfC4|3>XZmHn6%jjO?kBd+s>PdD=Q{!;h8^%N zaR+c>*azPfI6fuuvWR)pyv(^_@i+2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hPq&afd z)b_h6cPckS>HJ*o{V$k)q_Km@sU*tei>tJvP3 z?G@X4JEquoPOqgKF_-pd1=WZ@}B&@y&QOl%(W+N<09u3=+<#Yp2M710(15U z=4cxiIj=%D$GaUluSPe=@25H1#zoE;x;efBkyArAXFV`S+qlTN0^Jz+AUy?`R1700p_%UIoifWA6<0)&eiAca~=osBUJKE_exIQ<+JqJM6VO*#<+r; zM3*x*xNAzz+<0HEMK|Ag{WCd zMs#y-01>kVT|Roc3Ee#3-z^||dOdpdWXv7qv$`4GUi2I5zHb1=9su;)|7N6o?E6M^ zIelA^+VNc8gznkBhsG~Oz8T1m@MQgNy`|*jUG8VCZAg9U+mW|}*z+Ce?iGFBfo|S@ zK%d_P@7g zv3#EIN7om%KY(s+za`P9oN-b6gXq=TAHt3^>x)_+Mvq$2r=0QDx)u46GDh1w_)%~Y zxQ)A@{V`ySyyx73lv~0xy9fCRuoGMkVz$xey`?{5KUs;5^F{2Z@ad1(Pgi2C?JOep zGwAx`et#C-y{w@x?)T@=oy!VfjQ!tL_?*!m;( z%avIBuf~1_TYvQbRdn~VhQ8?kYv|FxG4_8SQa;|RucLcDXK&xWSKk2g@xA+I$;rE{ zIUN}9GyWEEF7ZwIHu?@wo%#LP^4rUM@f~#Y?gx?gUG#0Bn)f|y`N(?!-CX&b%39w? zw?}=^(+|)+Yt()aeFvz{@gZ#asQp89^W-D%N9guc&HFL7eB?chZmxXv^b>UZ(iit$ z&bs~``Z-tu{5xdN1IS+hd1D?${t`R_76NN%8>9a+71FPE6^DgXcg literal 0 HcmV?d00001 diff --git a/Assets/Shaders/ParticleRounded_VS.shshaderb.shmeta b/Assets/Shaders/ParticleRounded_VS.shshaderb.shmeta new file mode 100644 index 00000000..68577bd3 --- /dev/null +++ b/Assets/Shaders/ParticleRounded_VS.shshaderb.shmeta @@ -0,0 +1,3 @@ +Name: ParticleRounded_VS +ID: 44202416 +Type: 2 diff --git a/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp b/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp index 2858b2af..7bb5c552 100644 --- a/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp +++ b/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp @@ -1004,6 +1004,88 @@ namespace SHADE } + SHEditorWidgets::InputText("Custom Vertex Shader", + [comp = component]() + { + auto customShader = comp->GetCustomVertexShader(); + + if (customShader) + return customShader->GetName(); + else + return std::string{}; + + }, + [comp = component](std::string const& text) + { + }, {}, ImGuiSliderFlags_ReadOnly); + + if (SHDragDrop::BeginTarget()) + { + if (AssetID* payload = SHDragDrop::AcceptPayload(SHDragDrop::DRAG_RESOURCE)) + { + Handle shaderModule = SHResourceManager::LoadOrGet(*payload); + + if (shaderModule) + { + component->SetCustomVertexShader(shaderModule); + component->SetCustomVertexShaderAssetID(*payload); + } + else + { + SHLOG_WARNING("[] Attempted to load invalid shader! Custom vertex shader for particles not set. "); + } + + SHDragDrop::EndTarget(); + } + } + ImGui::SameLine(); + if (ImGui::Button("Reset")) + { + component->SetCustomVertexShader({}); + component->SetCustomVertexShaderAssetID(INVALID_ASSET_ID); + } + + + SHEditorWidgets::InputText("Custom Fragment Shader", + [comp = component]() + { + auto customShader = comp->GetCustomFragmentShader(); + + if (customShader) + return customShader->GetName(); + else + return std::string{}; + + }, + [comp = component](std::string const& text) + { + }, {}, ImGuiSliderFlags_ReadOnly); + + if (SHDragDrop::BeginTarget()) + { + if (AssetID* payload = SHDragDrop::AcceptPayload(SHDragDrop::DRAG_RESOURCE)) + { + Handle shaderModule = SHResourceManager::LoadOrGet(*payload); + + if (shaderModule) + { + component->SetCustomFragmentShader(shaderModule); + component->SetCustomFragmentShaderAssetID(*payload); + } + else + { + SHLOG_WARNING("[] Attempted to load invalid shader! Custom fragment shader for particles not set. "); + } + + SHDragDrop::EndTarget(); + } + } + ImGui::SameLine(); + if (ImGui::Button("Reset")) + { + component->SetCustomFragmentShader({}); + component->SetCustomFragmentShaderAssetID(INVALID_ASSET_ID); + } SHEditorWidgets::CheckBox("Is Passive", [comp = component]() {return comp->GetPassive(); }, [comp = component](bool flag) {comp->SetPassive(flag); }); diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.cpp index f7ccc2ed..392e18a5 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.cpp +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.cpp @@ -124,6 +124,16 @@ namespace SHADE customUpdateShaderID = id; } + void SHParticleEmitterComponent::SetCustomVertexShaderAssetID(AssetID id) noexcept + { + customVertexShaderID = id; + } + + void SHParticleEmitterComponent::SetCustomFragmentShaderAssetID(AssetID id) noexcept + { + customFragmentShaderID = id; + } + void SHParticleEmitterComponent::SetMinSize(float size) noexcept { cpuEmitterData.lifeAndSizeRange.z = size; @@ -139,6 +149,16 @@ namespace SHADE cpuEmitterData.sizeDecayMult = decay; } + void SHParticleEmitterComponent::SetCustomVertexShader(Handle shaderModule) noexcept + { + customVertexShader = shaderModule; + } + + void SHParticleEmitterComponent::SetCustomFragmentShader(Handle shaderModule) noexcept + { + customFragmentShader = shaderModule; + } + void SHParticleEmitterComponent::SetCustomUpdateShader(Handle shaderModule) noexcept { customUpdateShader = shaderModule; @@ -276,6 +296,16 @@ namespace SHADE return customUpdateShaderID; } + AssetID SHParticleEmitterComponent::GetCustomVertexShaderAssetID(void) const noexcept + { + return customVertexShaderID; + } + + AssetID SHParticleEmitterComponent::GetCustomFragmentShaderAssetID(void) const noexcept + { + return customFragmentShaderID; + } + float SHParticleEmitterComponent::GetMinSize(void) const noexcept { return cpuEmitterData.lifeAndSizeRange.z; @@ -297,6 +327,16 @@ namespace SHADE return customUpdateShader; } + Handle SHParticleEmitterComponent::GetCustomVertexShader(void) const noexcept + { + return customVertexShader; + } + + Handle SHParticleEmitterComponent::GetCustomFragmentShader(void) const noexcept + { + return customFragmentShader; + } + SHVec4 const& SHParticleEmitterComponent::GetColorTint(void) const noexcept { return cpuEmitterData.colorTint; diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.h b/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.h index f43ebefb..d32ac2fc 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.h +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.h @@ -115,7 +115,7 @@ namespace SHADE Handle particleData; //! Freelist data - Handle freelistData; + Handle freelistData; //! Indices data Handle indicesData; @@ -133,6 +133,16 @@ namespace SHADE //! Internally the system will bind this pipeline when it detects that this is not a null handle Handle customUpdatePipeline; + //! Custom vertex shader + Handle customVertexShader; + + //! Custom fragment shader + Handle customFragmentShader; + + //! Custom graphics pipeline for drawing particles (created + //! from the VS and FS above). + Handle customGraphicsPipeline; + //! Emitter's data on the CPU side. To be copied to GPU. GPUEmitterStruct cpuEmitterData; @@ -154,6 +164,12 @@ namespace SHADE //! Custom update shaders, similarly with textures, will be identified through their AssetID AssetID customUpdateShaderID; + //! Custom vertex shaders, similarly with textures, will be identified through their AssetID + AssetID customVertexShaderID; + + //! Custom fragment shaders, similarly with textures, will be identified through their AssetID + AssetID customFragmentShaderID; + public: void OnCreate(void) override final; void OnDestroy(void) override final; @@ -177,6 +193,8 @@ namespace SHADE void SetMinSize (float size) noexcept; void SetMaxSize (float size) noexcept; void SetSizeDecayMult (float decay) noexcept; + void SetCustomVertexShader (Handle shaderModule) noexcept; + void SetCustomFragmentShader (Handle shaderModule) noexcept; void SetCustomUpdateShader (Handle shaderModule) noexcept; void SetColorTint (SHVec4 tint) noexcept; void SetColorTintRGB (SHVec3 tint) noexcept; @@ -189,42 +207,49 @@ namespace SHADE void SetColorDecayRGB (SHVec3 const& decay) noexcept; void SetColorDecayAlpha (float alpha) noexcept; - uint32_t GetEmissionCount (void) const noexcept; - bool GetPassive (void) const noexcept; - float GetEmissionInterval (void) const noexcept; - float GetMinLife (void) const noexcept; - float GetMaxLife (void) const noexcept; - SHVec4 const& GetAngularRangesAndOffsets (void) const noexcept; - SHVec2 GetAngularRanges (void) const noexcept; - SHVec2 GetAngularOffsets (void) const noexcept; - SHVec3 GetAcceleration (void) const noexcept; - float GetMinSpeed (void) const noexcept; - float GetMaxSpeed (void) const noexcept; - float GetRotationSpeed (void) const noexcept; - float GetRotationDecay (void) const noexcept; - uint32_t GetTextureIndex (void) const noexcept; - float GetMinSize (void) const noexcept; - float GetMaxSize (void) const noexcept; - float GetSizeDecayMult (void) const noexcept; - Handle GetCustomUpdateShader (void) const noexcept; - SHVec4 const& GetColorTint (void) const noexcept; - SHVec3 GetColorTintRGB (void) const noexcept; - float GetColorTintAlpha (void) const noexcept; - SHVec4 const& GetColorTintRange (void) const noexcept; - SHVec3 GetColorTintRangeRGB (void) const noexcept; - float GetColorTintRangeAlpha (void) const noexcept; - SHVec4 const& GetColorDecay (void) const noexcept; - SHVec3 GetColorDecayRGB (void) const noexcept; - float GetColorDecayAlpha (void) const noexcept; + uint32_t GetEmissionCount (void) const noexcept; + bool GetPassive (void) const noexcept; + float GetEmissionInterval (void) const noexcept; + float GetMinLife (void) const noexcept; + float GetMaxLife (void) const noexcept; + SHVec4 const& GetAngularRangesAndOffsets (void) const noexcept; + SHVec2 GetAngularRanges (void) const noexcept; + SHVec2 GetAngularOffsets (void) const noexcept; + SHVec3 GetAcceleration (void) const noexcept; + float GetMinSpeed (void) const noexcept; + float GetMaxSpeed (void) const noexcept; + float GetRotationSpeed (void) const noexcept; + float GetRotationDecay (void) const noexcept; + uint32_t GetTextureIndex (void) const noexcept; + float GetMinSize (void) const noexcept; + float GetMaxSize (void) const noexcept; + float GetSizeDecayMult (void) const noexcept; + Handle GetCustomUpdateShader (void) const noexcept; + Handle GetCustomVertexShader (void) const noexcept; + Handle GetCustomFragmentShader (void) const noexcept; + SHVec4 const& GetColorTint (void) const noexcept; + SHVec3 GetColorTintRGB (void) const noexcept; + float GetColorTintAlpha (void) const noexcept; + SHVec4 const& GetColorTintRange (void) const noexcept; + SHVec3 GetColorTintRangeRGB (void) const noexcept; + float GetColorTintRangeAlpha (void) const noexcept; + SHVec4 const& GetColorDecay (void) const noexcept; + SHVec3 GetColorDecayRGB (void) const noexcept; + float GetColorDecayAlpha (void) const noexcept; /*-----------------------------------------------------------------------*/ /* NON-INTERFACE FUNCTIONS */ /*-----------------------------------------------------------------------*/ void SetTextureAssetID(AssetID id) noexcept; void SetCustomUpdateShaderAssetID(AssetID id) noexcept; + void SetCustomVertexShaderAssetID(AssetID id) noexcept; + void SetCustomFragmentShaderAssetID (AssetID id) noexcept; AssetID GetTextureAssetID(void) const noexcept; AssetID GetCustomUpdateShaderAssetID(void) const noexcept; + AssetID GetCustomVertexShaderAssetID(void) const noexcept; + AssetID GetCustomFragmentShaderAssetID(void) const noexcept; + friend class SHParticleSubSystem; diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleSubSystem.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleSubSystem.cpp index d99832a5..92405264 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleSubSystem.cpp +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleSubSystem.cpp @@ -268,10 +268,73 @@ namespace SHADE return customUpdatePipelineCache.at (customUpdateShader).customPipeline; } - void SHParticleSubSystem::Init(Handle device, Handle inDescPool, Handle compatibleRenderpass, Handle subpass, Handle VS, Handle FS, Handle emitCS, Handle defaultUpdateCS) noexcept + Handle SHParticleSubSystem::GetCustomGraphicsPipeline(Handle customVS, Handle customFS) noexcept + { + if (!customVS || !customFS) + return {}; + + if (!customGraphicsPipelineCache.contains(std::make_pair(customVS, customFS))) + { + SHPipelineLayoutParams plParams + { + .shaderModules = {customVS, customFS}, + .predefinedDescSetLayouts = SHGraphicsPredefinedData::GetSystemData(SHGraphicsPredefinedData::SystemType::PARTICLE_RENEDERING).descSetLayouts + }; + + auto pipelineLayout = logicalDevice->CreatePipelineLayout(plParams); + auto newPipeline = logicalDevice->CreateGraphicsPipeline(pipelineLayout, nullptr, renderpass, subpass); + + SHColorBlendState colorBlendState{}; + colorBlendState.logic_op_enable = VK_FALSE; + colorBlendState.logic_op = vk::LogicOp::eCopy; + + auto const& subpassColorReferences = subpass->GetColorAttachmentReferences(); + colorBlendState.attachments.reserve(subpassColorReferences.size()); + + + for (auto& att : subpassColorReferences) + { + colorBlendState.attachments.push_back(vk::PipelineColorBlendAttachmentState + { + .blendEnable = SHVkUtil::IsBlendCompatible(subpass->GetFormatFromAttachmentReference(att.attachment)), + .srcColorBlendFactor = vk::BlendFactor::eSrcAlpha, + .dstColorBlendFactor = vk::BlendFactor::eOneMinusSrcAlpha, + .colorBlendOp = vk::BlendOp::eAdd, + .srcAlphaBlendFactor = vk::BlendFactor::eSrcAlpha, + .dstAlphaBlendFactor = vk::BlendFactor::eOneMinusSrcAlpha, + .alphaBlendOp = vk::BlendOp::eAdd, + .colorWriteMask = vk::ColorComponentFlagBits::eR | vk::ColorComponentFlagBits::eG | vk::ColorComponentFlagBits::eB | vk::ColorComponentFlagBits::eA, + } + ); + } + + newPipeline->GetPipelineState().SetColorBlenState(colorBlendState); + + // Sets the input assembly state for rendering particles + SHInputAssemblyState inputAssemblyState{}; + inputAssemblyState.topology = vk::PrimitiveTopology::eTriangleFan; + newPipeline->GetPipelineState().SetInputAssemblyState(inputAssemblyState); + + newPipeline->ConstructPipeline(); + + if (!newPipeline) + return {}; + + auto customUpdateShaderData = CustomPipeline{ newPipeline, pipelineLayout }; + + customGraphicsPipelineCache.emplace(std::make_pair(customVS, customFS), customUpdateShaderData); + } + + return customGraphicsPipelineCache.at(std::make_pair(customVS, customFS)).customPipeline; + + } + + void SHParticleSubSystem::Init(Handle device, Handle inDescPool, Handle compatibleRenderpass, Handle compatibleSubpass, Handle VS, Handle FS, Handle emitCS, Handle defaultUpdateCS) noexcept { descPool = inDescPool; logicalDevice = device; + renderpass = compatibleRenderpass; + subpass = compatibleSubpass; /*-----------------------------------------------------------------------*/ /* INITIALIZE ALL PIPELINES */ @@ -499,12 +562,22 @@ namespace SHADE auto& emitters = SHComponentManager::GetDense(); auto const& mappings = SHGraphicsPredefinedData::GetMappings(SHGraphicsPredefinedData::SystemType::PARTICLE_RENEDERING); - // bind the pipeline for updating - cmdBuffer->BindPipeline(renderingPipelineData.pipeline); - // TODO: Issue barrier for output particle data. Semaphore should also be issued outside in SHGraphicsSystem for (auto& emitter : emitters) { + if (emitter.customVertexShader && emitter.customFragmentShader) + { + if (!emitter.customGraphicsPipeline) + emitter.customGraphicsPipeline = GetCustomGraphicsPipeline(emitter.customVertexShader, emitter.customFragmentShader); + + cmdBuffer->BindPipeline(emitter.customGraphicsPipeline); + } + else + { + // bind the pipeline for updating + cmdBuffer->BindPipeline(renderingPipelineData.pipeline); + } + if (emitter.isActive) { // bind the descriptor sets required for emitting particles diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleSubSystem.h b/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleSubSystem.h index a0675da6..2288a5bb 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleSubSystem.h +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleSubSystem.h @@ -82,7 +82,14 @@ namespace SHADE //! Desc pool for particle component desc set allocation Handle descPool; + //! Renderpass the system draws its particles in + Handle renderpass; + + //! Subpass the system draws its particles in + Handle subpass; + std::unordered_map, CustomPipeline> customUpdatePipelineCache; + std::unordered_map, Handle>, CustomPipeline> customGraphicsPipelineCache; void InitializeComponent (SHParticleEmitterComponent& comp) noexcept; @@ -92,10 +99,11 @@ namespace SHADE void PreparePrePostUpdateBarriers (std::vector& preUpdateBarriers, std::vector& postUpdateBarriers, SHParticleEmitterComponent const& emitter, uint32_t const EMITTER_INDEX, uint32_t const FRAME_INDEX) noexcept; - Handle GetCustomUpdatePipeline (Handle customUpdateShader) noexcept; + Handle GetCustomUpdatePipeline(Handle customUpdateShader) noexcept; + Handle GetCustomGraphicsPipeline(Handle customVS, Handle customFS) noexcept; public: - void Init(Handle device, Handle inDescPool, Handle compatibleRenderpass, Handle subpass, Handle VS, Handle FS, Handle emitCS, Handle defaultUpdateCS) noexcept; + void Init(Handle device, Handle inDescPool, Handle compatibleRenderpass, Handle compatibleSubpass, Handle VS, Handle FS, Handle emitCS, Handle defaultUpdateCS) noexcept; void Run(Handle cmdBuffer, uint32_t frameIndex, Handle waitFence = {}) noexcept; void ResetInstanceCounts (Handle cmdBuffer, uint32_t frameIndex) noexcept; diff --git a/SHADE_Engine/src/Serialization/SHYAMLConverters.h b/SHADE_Engine/src/Serialization/SHYAMLConverters.h index a1c185aa..0df15b5b 100644 --- a/SHADE_Engine/src/Serialization/SHYAMLConverters.h +++ b/SHADE_Engine/src/Serialization/SHYAMLConverters.h @@ -518,6 +518,8 @@ namespace YAML static constexpr std::string_view ROTATION_SPEED_TAG = "Rotation Speed"; static constexpr std::string_view ROTATION_DECAY_TAG = "Rotation Decay"; static constexpr std::string_view TEXTURE_ASSET_ID_TAG = "Texture Asset ID"; + static constexpr std::string_view CUSTOM_VERTEX_SHADER_ASSET_ID_TAG = "Custom Vertex Shader Asset ID"; + static constexpr std::string_view CUSTOM_FRAGMENT_SHADER_ASSET_ID_TAG = "Custom Fragment Shader Asset ID"; static constexpr std::string_view CUSTOM_UPDATE_SHADER_ASSET_ID_TAG = "Custom Update Shader Asset ID"; static constexpr std::string_view COLOR_TINT_TAG = "Color Tint"; static constexpr std::string_view COLOR_TINT_RANGE_TAG = "Color Tint Range"; @@ -541,6 +543,8 @@ namespace YAML node[ROTATION_SPEED_TAG.data()] = rhs.GetRotationSpeed(); node[ROTATION_DECAY_TAG.data()] = rhs.GetRotationDecay(); node[TEXTURE_ASSET_ID_TAG.data()] = rhs.GetTextureAssetID(); + node[CUSTOM_VERTEX_SHADER_ASSET_ID_TAG.data()] = rhs.GetCustomVertexShaderAssetID(); + node[CUSTOM_FRAGMENT_SHADER_ASSET_ID_TAG.data()] = rhs.GetCustomFragmentShaderAssetID(); node[CUSTOM_UPDATE_SHADER_ASSET_ID_TAG.data()] = rhs.GetCustomUpdateShaderAssetID(); node[COLOR_TINT_TAG.data()] = rhs.GetColorTint(); node[COLOR_TINT_RANGE_TAG.data()] = rhs.GetColorTintRange(); @@ -634,6 +638,31 @@ namespace YAML rhs.SetCustomUpdateShader(shaderModule); rhs.SetCustomUpdateShaderAssetID(id); } + + if (node[CUSTOM_VERTEX_SHADER_ASSET_ID_TAG.data()].IsDefined()) + { + AssetID id = node[CUSTOM_VERTEX_SHADER_ASSET_ID_TAG.data()].as(); + + Handle shaderModule = SHResourceManager::LoadOrGet(id); + SHResourceManager::FinaliseChanges(); + //gfxSystem->BuildTextures(); + + rhs.SetCustomVertexShader(shaderModule); + rhs.SetCustomVertexShaderAssetID(id); + } + + if (node[CUSTOM_FRAGMENT_SHADER_ASSET_ID_TAG.data()].IsDefined()) + { + AssetID id = node[CUSTOM_FRAGMENT_SHADER_ASSET_ID_TAG.data()].as(); + + Handle shaderModule = SHResourceManager::LoadOrGet(id); + SHResourceManager::FinaliseChanges(); + //gfxSystem->BuildTextures(); + + rhs.SetCustomFragmentShader(shaderModule); + rhs.SetCustomFragmentShaderAssetID(id); + } + return true; } From b123cd83f85416bfe7f1d6ee2b16ca896d3266f1 Mon Sep 17 00:00:00 2001 From: maverickdgg Date: Fri, 31 Mar 2023 14:14:44 +0800 Subject: [PATCH 6/9] Updated Main menu with correct slider scale and added fx for buttons --- Assets/Scenes/MainMenu.shade | 56 ++++++++++++++++++++++++++++++------ 1 file changed, 48 insertions(+), 8 deletions(-) diff --git a/Assets/Scenes/MainMenu.shade b/Assets/Scenes/MainMenu.shade index 64904465..7e624cd3 100644 --- a/Assets/Scenes/MainMenu.shade +++ b/Assets/Scenes/MainMenu.shade @@ -754,7 +754,7 @@ Transform Component: Translate: {x: 0, y: 0, z: 0} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1024, y: 64, z: 1} + Scale: {x: 1004, y: 46, z: 1} IsActive: true Renderable Component: Mesh: 141771688 @@ -779,7 +779,7 @@ Transform Component: Translate: {x: 0, y: 0, z: 0.100000001} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1.02499998, y: 1.25, z: 1} + Scale: {x: 1.01992035, y: 1.39130437, z: 1} IsActive: true Renderable Component: Mesh: 141771688 @@ -799,7 +799,7 @@ Transform Component: Translate: {x: 0, y: -100, z: 0} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1024, y: 64, z: 1} + Scale: {x: 1004, y: 46, z: 1} IsActive: true Renderable Component: Mesh: 141771688 @@ -824,7 +824,7 @@ Transform Component: Translate: {x: 0, y: 0, z: 0.100000001} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1.02499998, y: 1.25, z: 1} + Scale: {x: 1.01992035, y: 1.39130437, z: 1} IsActive: true Renderable Component: Mesh: 141771688 @@ -844,7 +844,7 @@ Transform Component: Translate: {x: 0, y: -200, z: 0} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1024, y: 64, z: 1} + Scale: {x: 1004, y: 46, z: 1} IsActive: true Renderable Component: Mesh: 141771688 @@ -869,7 +869,7 @@ Transform Component: Translate: {x: 0, y: 0, z: 0.100000001} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1.02499998, y: 1.25, z: 1} + Scale: {x: 1.01992035, y: 1.39130437, z: 1} IsActive: true Renderable Component: Mesh: 141771688 @@ -1009,7 +1009,7 @@ Transform Component: Translate: {x: 0, y: 0, z: 0} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1024, y: 64, z: 1} + Scale: {x: 1004, y: 46, z: 1} IsActive: true Renderable Component: Mesh: 141771688 @@ -1034,7 +1034,7 @@ Transform Component: Translate: {x: 0, y: 0, z: 0.100000001} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1.02499998, y: 1.25, z: 1} + Scale: {x: 1.01992035, y: 1.39130437, z: 1} IsActive: true Renderable Component: Mesh: 141771688 @@ -1075,6 +1075,14 @@ Enabled: true inverseX: true inverseY: false + - Type: SHADE_Scripting.UI.ButtonFX + Enabled: true + onHoverEnterSound: event:/UI/botton_hover + onHoverExitSound: Empty + onClickSound: event:/UI/button_success + onReleaseSound: event:/UI/button_fail + hoverScale: 1.25 + clickScale: 0.899999976 - EID: 445 Name: Invert Y Toggle Button IsActive: true @@ -1104,6 +1112,14 @@ Enabled: true inverseX: false inverseY: true + - Type: SHADE_Scripting.UI.ButtonFX + Enabled: true + onHoverEnterSound: event:/UI/botton_hover + onHoverExitSound: Empty + onClickSound: event:/UI/button_success + onReleaseSound: event:/UI/button_fail + hoverScale: 1.25 + clickScale: 0.899999976 - EID: 39 Name: Audio Slider Text Group IsActive: true @@ -1526,6 +1542,14 @@ - Type: ChangeSceneButton Enabled: true sceneID: 91947920 + - Type: SHADE_Scripting.UI.ButtonFX + Enabled: true + onHoverEnterSound: event:/UI/botton_hover + onHoverExitSound: Empty + onClickSound: event:/UI/button_success + onReleaseSound: event:/UI/button_fail + hoverScale: 1.10000002 + clickScale: 0.899999976 - EID: 439 Name: Level 2 Button IsActive: true @@ -1554,6 +1578,14 @@ - Type: ChangeSceneButton Enabled: true sceneID: 86098106 + - Type: SHADE_Scripting.UI.ButtonFX + Enabled: true + onHoverEnterSound: event:/UI/botton_hover + onHoverExitSound: Empty + onClickSound: event:/UI/button_success + onReleaseSound: event:/UI/button_fail + hoverScale: 1.10000002 + clickScale: 0.899999976 - EID: 438 Name: Level 3 Button IsActive: true @@ -1582,6 +1614,14 @@ - Type: ChangeSceneButton Enabled: true sceneID: 88928066 + - Type: SHADE_Scripting.UI.ButtonFX + Enabled: true + onHoverEnterSound: event:/UI/botton_hover + onHoverExitSound: Empty + onClickSound: event:/UI/button_success + onReleaseSound: event:/UI/button_fail + hoverScale: 1.10000002 + clickScale: 0.899999976 - EID: 450 Name: TransitionCanvas IsActive: false From 6ee619d26e2c8851996b698dcb043a2331c487e5 Mon Sep 17 00:00:00 2001 From: maverickdgg Date: Fri, 31 Mar 2023 14:18:09 +0800 Subject: [PATCH 7/9] Added Slider SFX --- Assets/Scenes/MainMenu.shade | 24 +++++++-- Assets/Scripts/UI/SC_SliderFX.cs | 70 +++++++++++++++++++++++++ Assets/Scripts/UI/SC_SliderFX.cs.shmeta | 3 ++ 3 files changed, 93 insertions(+), 4 deletions(-) create mode 100644 Assets/Scripts/UI/SC_SliderFX.cs create mode 100644 Assets/Scripts/UI/SC_SliderFX.cs.shmeta diff --git a/Assets/Scenes/MainMenu.shade b/Assets/Scenes/MainMenu.shade index 7e624cd3..d3ddd940 100644 --- a/Assets/Scenes/MainMenu.shade +++ b/Assets/Scenes/MainMenu.shade @@ -770,7 +770,11 @@ Hovered: false Clicked: false IsActive: true - Scripts: ~ + Scripts: + - Type: SHADE_Scripting.UI.SliderFX + Enabled: true + onClickSound: event:/UI/button_success + onReleaseSound: event:/UI/button_fail - EID: 437 Name: Slider BG IsActive: true @@ -815,7 +819,11 @@ Hovered: false Clicked: false IsActive: true - Scripts: ~ + Scripts: + - Type: SHADE_Scripting.UI.SliderFX + Enabled: true + onClickSound: event:/UI/button_success + onReleaseSound: event:/UI/button_fail - EID: 436 Name: Slider BG IsActive: true @@ -860,7 +868,11 @@ Hovered: false Clicked: false IsActive: true - Scripts: ~ + Scripts: + - Type: SHADE_Scripting.UI.SliderFX + Enabled: true + onClickSound: event:/UI/button_success + onReleaseSound: event:/UI/button_fail - EID: 435 Name: Slider BG IsActive: true @@ -1025,7 +1037,11 @@ Hovered: false Clicked: false IsActive: true - Scripts: ~ + Scripts: + - Type: SHADE_Scripting.UI.SliderFX + Enabled: true + onClickSound: event:/UI/button_success + onReleaseSound: event:/UI/button_fail - EID: 434 Name: Slider BG IsActive: true diff --git a/Assets/Scripts/UI/SC_SliderFX.cs b/Assets/Scripts/UI/SC_SliderFX.cs new file mode 100644 index 00000000..f2c20dcd --- /dev/null +++ b/Assets/Scripts/UI/SC_SliderFX.cs @@ -0,0 +1,70 @@ +using SHADE; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SHADE_Scripting.UI +{ + public class SliderFX : Script + { + + public string onClickSound = "event:/UI/button_success"; + public string onReleaseSound = "event:/UI/button_fail"; + + + [NonSerialized] + private AudioClipHandler onClickACHandler; + [NonSerialized] + private AudioClipHandler onReleaseACHandler; + + + + protected override void awake() + { + + + if (onClickSound != "Empty") + onClickACHandler = SHADE.Audio.CreateAudioClip(onClickSound); + if (onReleaseSound != "Empty") + onReleaseACHandler = SHADE.Audio.CreateAudioClip(onReleaseSound); + } + + protected override void start() + { + + + Transform transform = GetComponent(); + if (transform == null) + return; + + UIElement ui = GetComponent(); + if (ui == null) + return; + + + ui.OnClick.RegisterAction(() => + { + if (onClickSound != "Empty") + onClickACHandler.Play(); + + }); + + ui.OnRelease.RegisterAction(() => + { + if (onReleaseSound != "Empty") + onReleaseACHandler.Play(); + + }); + + } + + protected override void update() + { + + } + + + } +} diff --git a/Assets/Scripts/UI/SC_SliderFX.cs.shmeta b/Assets/Scripts/UI/SC_SliderFX.cs.shmeta new file mode 100644 index 00000000..fdb814d0 --- /dev/null +++ b/Assets/Scripts/UI/SC_SliderFX.cs.shmeta @@ -0,0 +1,3 @@ +Name: SC_SliderFX +ID: 157251414 +Type: 9 From af9e523da95ad41753fb8970d3d7433d45e16665 Mon Sep 17 00:00:00 2001 From: maverickdgg Date: Fri, 31 Mar 2023 14:50:25 +0800 Subject: [PATCH 8/9] Gameplay UI Update --- Assets/Scenes/Level2.shade | 213 +++++++++++++++++++++- Assets/Scripts/Gameplay/SC_GameManager.cs | 2 +- Assets/Scripts/UI/SC_GameTimer.cs | 57 ++++++ Assets/Scripts/UI/SC_GameTimer.cs.shmeta | 3 + Assets/Scripts/UI/SC_MultiplierTextFx.cs | 88 +++------ Assets/Scripts/UI/SC_ScaleBounce.cs | 4 +- 6 files changed, 299 insertions(+), 68 deletions(-) create mode 100644 Assets/Scripts/UI/SC_GameTimer.cs create mode 100644 Assets/Scripts/UI/SC_GameTimer.cs.shmeta diff --git a/Assets/Scenes/Level2.shade b/Assets/Scenes/Level2.shade index 4355b33e..7a131e4b 100644 --- a/Assets/Scenes/Level2.shade +++ b/Assets/Scenes/Level2.shade @@ -122,8 +122,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.876652002, y: 0.485357881, z: 0.166061834, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -193,8 +197,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.876652002, y: 0.485357881, z: 0.166061834, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -264,8 +272,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.977993011, y: 1, z: 0.286343634, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -335,8 +347,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.977993011, y: 1, z: 0.286343634, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -406,8 +422,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -477,8 +497,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -548,8 +572,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -619,8 +647,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 1, y: 1, z: 1, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.00999999978, z: 0} IsActive: true Scripts: @@ -863,8 +895,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.876652002, y: 0.485357881, z: 0.166061834, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -934,8 +970,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -1005,8 +1045,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -1076,8 +1120,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -1147,8 +1195,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.977993011, y: 1, z: 0.286343634, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -1218,8 +1270,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.876652002, y: 0.485357881, z: 0.166061834, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -1289,8 +1345,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.876652002, y: 0.485357881, z: 0.166061834, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -1360,8 +1420,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.876652002, y: 0.485357881, z: 0.166061834, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -1431,8 +1495,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -1502,8 +1570,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -1573,8 +1645,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -1644,8 +1720,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -1715,8 +1795,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -1786,8 +1870,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -1857,8 +1945,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.876652002, y: 0.485357881, z: 0.166061834, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -1928,8 +2020,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.977993011, y: 1, z: 0.286343634, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -1999,8 +2095,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -2070,8 +2170,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -2141,8 +2245,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -2212,8 +2320,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.290321946, y: 0.823788524, z: 0.323222876, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -2288,8 +2400,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.290321946, y: 0.823788524, z: 0.323222876, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -2359,8 +2475,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.290321946, y: 0.823788524, z: 0.323222876, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -2430,8 +2550,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.290321946, y: 0.823788524, z: 0.323222876, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -2501,8 +2625,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.290321946, y: 0.823788524, z: 0.323222876, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -2572,8 +2700,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.290321946, y: 0.823788524, z: 0.323222876, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -2643,8 +2775,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.290321946, y: 0.823788524, z: 0.323222876, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -2719,8 +2855,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.290321946, y: 0.823788524, z: 0.323222876, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -2790,8 +2930,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.290321946, y: 0.823788524, z: 0.323222876, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -2861,8 +3005,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.290321946, y: 0.823788524, z: 0.323222876, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -2932,8 +3080,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.290321946, y: 0.823788524, z: 0.323222876, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -3003,8 +3155,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.290321946, y: 0.823788524, z: 0.323222876, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -3074,8 +3230,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 1, y: 1, z: 1, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.00999999978, z: 0} IsActive: true Scripts: @@ -3318,8 +3478,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 1, y: 1, z: 1, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.00999999978, z: 0} IsActive: true Scripts: @@ -3601,8 +3765,12 @@ Rotation Speed: 0.0500000007 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 37407233 Color Tint: {x: 0, y: 0, z: 0, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0299999993, z: 0} IsActive: true Scripts: ~ @@ -3695,8 +3863,12 @@ Rotation Speed: 0.0500000007 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 37407233 Color Tint: {x: 0, y: 0, z: 0, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0299999993, z: 0} IsActive: true Scripts: ~ @@ -3980,8 +4152,12 @@ Rotation Speed: 0.805999994 Rotation Decay: 0 Texture Asset ID: 56224060 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 42141152 Color Tint: {x: 1, y: 1, z: 1, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0.0500000007, z: 0} IsActive: true Scripts: ~ @@ -4010,8 +4186,12 @@ Rotation Speed: 0.805999994 Rotation Decay: 0 Texture Asset ID: 56224060 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 42141152 Color Tint: {x: 1, y: 1, z: 1, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0.0500000007, z: 0} IsActive: true Scripts: ~ @@ -17034,14 +17214,24 @@ Hovered: false Clicked: false IsActive: true - Scripts: ~ + Scripts: + - Type: SHADE_Scripting.UI.GameTimer + Enabled: true + criticalTime: 30 + timer: 0 + - Type: SHADE_Scripting.UI.ScaleBounce + Enabled: true + minScale: 1 + maxScale: 1.20000005 + duration: 1 + isActive: false - EID: 520 Name: Timer BG IsActive: true NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 0.5, y: 0.300000012, z: 0.98999995} + Translate: {x: 0, y: 0.300000012, z: 0.98999995} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 5, y: 2, z: 1} IsActive: true @@ -17086,7 +17276,7 @@ NumberOfChildren: 1 Components: Transform Component: - Translate: {x: -800, y: 250, z: 0.100000001} + Translate: {x: -800, y: 200, z: 0.100000001} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 50, y: 50, z: 60} IsActive: true @@ -17104,9 +17294,8 @@ Scripts: - Type: SHADE_Scripting.UI.MultiplierTextFx Enabled: true - maxSize: 1 - minSize: 0.300000012 - minAlpha: 0.300000012 + maxSize: 1.5 + minSize: 1 - EID: 131593 Name: Multiplier BG IsActive: true @@ -17180,8 +17369,12 @@ Rotation Speed: 0 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.0187467411, y: 0.627120614, z: 0.709251106, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.899999976, z: 0} IsActive: true Scripts: ~ @@ -17210,8 +17403,12 @@ Rotation Speed: 0 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.0187467411, y: 0.627120614, z: 0.709251106, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0.100000001, z: 0} IsActive: true Scripts: ~ @@ -17240,8 +17437,12 @@ Rotation Speed: 0 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.0187467411, y: 0.627120614, z: 0.709251106, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.100000001, z: 0} IsActive: true Scripts: ~ diff --git a/Assets/Scripts/Gameplay/SC_GameManager.cs b/Assets/Scripts/Gameplay/SC_GameManager.cs index b4e17d29..0579abd9 100644 --- a/Assets/Scripts/Gameplay/SC_GameManager.cs +++ b/Assets/Scripts/Gameplay/SC_GameManager.cs @@ -136,7 +136,7 @@ public class GameManager : Script if(scoreText) scoreText.GetComponent().Text = $"{Score}"; if(timeText) - timeText.GetComponent().Text = $"{timer.ToString("0.00")}"; + timeText.GetComponent().Text = $"{timer.ToString("0")}"; if (itemScored) { diff --git a/Assets/Scripts/UI/SC_GameTimer.cs b/Assets/Scripts/UI/SC_GameTimer.cs new file mode 100644 index 00000000..86247f88 --- /dev/null +++ b/Assets/Scripts/UI/SC_GameTimer.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using SHADE; + +namespace SHADE_Scripting.UI +{ + public class GameTimer: Script + { + private ScaleBounce scaleBounce; + private TextRenderable text; + public float criticalTime = 30; + + public float timer; + + + protected override void awake() + { + text = GetComponent(); + if(!text) + { + Debug.Log("GameTimer: No text renderable found"); + } + + scaleBounce = GetScript(); + if(!scaleBounce) + { + Debug.Log("GameTimer: No Scalebounce found in children"); + } + else + { + scaleBounce.isActive = false; + } + + } + + + protected override void update() + { + timer = GameManager.Instance.timer; + + if (timer <= criticalTime) + { + scaleBounce.isActive = true; + text.TextColor = new Color(1.0f, 0.0f, 0.0f, 1.0f); + } + + + + } + + + + } +} diff --git a/Assets/Scripts/UI/SC_GameTimer.cs.shmeta b/Assets/Scripts/UI/SC_GameTimer.cs.shmeta new file mode 100644 index 00000000..ed4b185f --- /dev/null +++ b/Assets/Scripts/UI/SC_GameTimer.cs.shmeta @@ -0,0 +1,3 @@ +Name: SC_GameTimer +ID: 158823052 +Type: 9 diff --git a/Assets/Scripts/UI/SC_MultiplierTextFx.cs b/Assets/Scripts/UI/SC_MultiplierTextFx.cs index ccd2a4a8..d49eddf4 100644 --- a/Assets/Scripts/UI/SC_MultiplierTextFx.cs +++ b/Assets/Scripts/UI/SC_MultiplierTextFx.cs @@ -12,98 +12,66 @@ namespace SHADE_Scripting.UI [NonSerialized] private TweenThread sizeThread; private TweenThread sizeInvertThread; - private TweenThread alphaThread; + public float maxSize = 1.0f; public float minSize = 0.3f; - public float minAlpha = 0.3f; - - private bool showMultiplier = false; const float sizeUpDuration = 0.1f; [NonSerialized] private Vector3 defaultScale; + private bool tweenUp = false; + protected override void start() { - sizeThread = TweenManager.CreateTweenThread(0.0f, maxSize, minSize, EASING_METHOD.EASE_IN_SINE); + sizeThread = TweenManager.CreateTweenThread(0.01f, maxSize, minSize, EASING_METHOD.EASE_IN_SINE); sizeInvertThread = TweenManager.CreateTweenThread(sizeUpDuration, minSize, maxSize, EASING_METHOD.EASE_IN_SINE); - alphaThread = TweenManager.CreateTweenThread(0.0f, 1.0f, minAlpha, EASING_METHOD.EASE_OUT_SINE); + Transform transform = GetComponent(); if (transform != null) { defaultScale = transform.LocalScale; transform.LocalScale = Vector3.Zero; } - - - showMultiplier = false; - } - protected override void update() + protected override void update() + { + Transform transform = GetComponent(); + + + if (transform != null) + { + if (tweenUp == false) { - Transform transform = GetComponent(); - - - if (transform != null && showMultiplier == true) - { - if(!sizeInvertThread.IsCompleted()) - { - transform.LocalScale = defaultScale * sizeInvertThread.GetValue(); - - Renderable rend = GetComponentInChildren(); - if(rend) - { - rend.Material.SetProperty("data.alpha", 1.0f); - } - - TextRenderable text = GetComponent(); - if (text) - { - Color clr = text.TextColor; - text.TextColor = new Color(clr.r, clr.g, clr.b, 1.0f); - } - return; - } - - if(sizeThread.IsCompleted()) - { - transform.LocalScale = Vector3.Zero; - showMultiplier = false; - } - else - { - transform.LocalScale = defaultScale * sizeThread.GetValue(); - - Renderable rend = GetComponentInChildren(); - if (rend) - { - rend.Material.SetProperty("data.alpha", alphaThread.GetValue()); - } - TextRenderable text = GetComponent(); - if(text) - { - Color clr = text.TextColor; - text.TextColor = new Color(clr.r,clr.g,clr.b,alphaThread.GetValue() * 1.3f); - } - } - } + transform.LocalScale = defaultScale * sizeThread.GetValue(); } + else + { + if (sizeInvertThread.IsCompleted()) + { + tweenUp = false; + sizeThread.Reset(); + } + + transform.LocalScale = defaultScale * sizeInvertThread.GetValue(); + + } + } + } public void ShowMultiplier(int multiplier, float duration) { GetComponent().Text = $"X {multiplier}"; sizeThread.duration = duration + sizeUpDuration; - alphaThread.duration = duration + sizeUpDuration; sizeInvertThread.Reset(); sizeThread.Reset(); - alphaThread.Reset(); - showMultiplier = true; + tweenUp = true; } diff --git a/Assets/Scripts/UI/SC_ScaleBounce.cs b/Assets/Scripts/UI/SC_ScaleBounce.cs index 0d5ca381..31b43671 100644 --- a/Assets/Scripts/UI/SC_ScaleBounce.cs +++ b/Assets/Scripts/UI/SC_ScaleBounce.cs @@ -19,6 +19,8 @@ namespace SHADE_Scripting.UI private Vector3 defaultScale; + public bool isActive = true; + protected override void start() { thread = TweenManager.CreateTweenThread(duration, minScale, maxScale, EASING_METHOD.EASE_IN_SINE); @@ -32,7 +34,7 @@ namespace SHADE_Scripting.UI protected override void update() { Transform trans = GetComponent(); - if(trans != null) + if(trans != null && isActive) { trans.LocalScale = defaultScale * thread.GetValue(); } From c335f587025d4ff343bc6b8b4ca29b5f40aecc6a Mon Sep 17 00:00:00 2001 From: maverickdgg Date: Fri, 31 Mar 2023 15:02:31 +0800 Subject: [PATCH 9/9] Updated Gameplay UI --- Assets/Scenes/Level1.shade | 427 ++++++++++++--------- Assets/Scenes/Level3.shade | 563 +++++++++++++++++++--------- Assets/Scripts/UI/SC_ScaleBounce.cs | 27 +- 3 files changed, 646 insertions(+), 371 deletions(-) diff --git a/Assets/Scenes/Level1.shade b/Assets/Scenes/Level1.shade index ab3f995a..e03d2dfc 100644 --- a/Assets/Scenes/Level1.shade +++ b/Assets/Scenes/Level1.shade @@ -7600,9 +7600,9 @@ Score: 0 timer: 200 scoreText: 237 - timeText: 525 - minusTimerText: 65735 - multiplierText: 524 + timeText: 131278 + minusTimerText: 131211 + multiplierText: 66055 maxMultiplierDuration: 5 maxMultiplierCombo: 10 multiplierFont: 60 @@ -7724,8 +7724,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.876652002, y: 0.485357881, z: 0.166061834, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -7795,8 +7799,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.977993011, y: 1, z: 0.286343634, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -7866,8 +7874,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -7937,8 +7949,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -8047,8 +8063,12 @@ Rotation Speed: 0.0500000007 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 37407233 Color Tint: {x: 0, y: 0, z: 0, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0299999993, z: 0} IsActive: true Scripts: ~ @@ -8141,8 +8161,12 @@ Rotation Speed: 0.0500000007 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 37407233 Color Tint: {x: 0, y: 0, z: 0, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0299999993, z: 0} IsActive: true Scripts: ~ @@ -8235,8 +8259,12 @@ Rotation Speed: 0.0500000007 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 37407233 Color Tint: {x: 0, y: 0, z: 0, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0299999993, z: 0} IsActive: true Scripts: ~ @@ -8329,8 +8357,12 @@ Rotation Speed: 0.0500000007 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 37407233 Color Tint: {x: 0, y: 0, z: 0, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0299999993, z: 0} IsActive: true Scripts: ~ @@ -8423,8 +8455,12 @@ Rotation Speed: 0.0500000007 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 37407233 Color Tint: {x: 0, y: 0, z: 0, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0299999993, z: 0} IsActive: true Scripts: ~ @@ -8685,8 +8721,12 @@ Rotation Speed: 0.805999994 Rotation Decay: 0 Texture Asset ID: 56224060 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 42141152 Color Tint: {x: 1, y: 1, z: 1, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0.0500000007, z: 0} IsActive: true Scripts: ~ @@ -8715,8 +8755,12 @@ Rotation Speed: 0.805999994 Rotation Decay: 0 Texture Asset ID: 56224060 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 42141152 Color Tint: {x: 1, y: 1, z: 1, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0.0500000007, z: 0} IsActive: true Scripts: ~ @@ -9046,183 +9090,6 @@ Casting Shadows: true IsActive: true Scripts: ~ -- EID: 526 - Name: Gameplay Canvas - IsActive: true - NumberOfChildren: 4 - Components: - Canvas Component: - Canvas Width: 1920 - Canvas Height: 1080 - Scale by canvas width: false - IsActive: true - Scripts: ~ -- EID: 237 - Name: Score Text - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: -800, y: 365, z: 0.600000024} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 100, y: 100, z: 60} - IsActive: true - Text Renderer Component: - Text: My name is Brandon. - Font: 174412429 - Color: {x: 1, y: 1, z: 1, w: 1} - Text Size: {x: 1, y: 1, z: 1} - IsActive: true - UI Component: - Canvas ID: 526 - Hovered: false - Clicked: false - IsActive: true - Scripts: - - Type: SHADE_Scripting.UI.ScoreTextDigitPositioning - Enabled: true - offsetPerDigit: 25 - - Type: SHADE_Scripting.UI.SingleScaleBounce - Enabled: true - durationUp: 0.150000006 - durationDown: 0.300000012 - scaleSize: 1.20000005 -- EID: 525 - Name: Timer Text - IsActive: true - NumberOfChildren: 2 - Components: - Transform Component: - Translate: {x: 700, y: 400, z: 0.600000024} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 60, y: 60, z: 1} - IsActive: true - Text Renderer Component: - Text: My name is Brandon. - Font: 174412429 - Color: {x: 1, y: 1, z: 1, w: 1} - Text Size: {x: 1, y: 1, z: 1} - IsActive: true - UI Component: - Canvas ID: 526 - Hovered: false - Clicked: false - IsActive: true - Scripts: ~ -- EID: 520 - Name: Timer BG - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 0.5, y: 0.300000012, z: 0.98999995} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 5, y: 2, z: 1} - IsActive: true - Renderable Component: - Mesh: 141771688 - Material: 126220632 - IsActive: true - UI Component: - Canvas ID: 526 - Hovered: false - Clicked: false - IsActive: true - Scripts: ~ -- EID: 65735 - Name: Minus Timer Text - IsActive: false - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 0, y: -0.800000012, z: 0.100000001} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1, y: 1, z: 1} - IsActive: false - Text Renderer Component: - Text: -10 - Font: 174412429 - Color: {x: 1, y: 0, z: 0, w: 1} - Text Size: {x: 1, y: 1, z: 1} - IsActive: false - UI Component: - Canvas ID: 526 - Hovered: false - Clicked: false - IsActive: false - Scripts: - - Type: SHADE_Scripting.UI.MinusTimerText - Enabled: true - duration: 2 -- EID: 524 - Name: Multiplier Text - IsActive: true - NumberOfChildren: 1 - Components: - Transform Component: - Translate: {x: -800, y: 250, z: 0.100000001} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 50, y: 50, z: 60} - IsActive: true - Text Renderer Component: - Text: X2 - Font: 174412429 - Color: {x: 1, y: 1, z: 1, w: 1} - Text Size: {x: 1, y: 1, z: 1} - IsActive: true - UI Component: - Canvas ID: 526 - Hovered: false - Clicked: false - IsActive: true - Scripts: - - Type: SHADE_Scripting.UI.MultiplierTextFx - Enabled: true - maxSize: 1 - minSize: 0.300000012 - minAlpha: 0.300000012 -- EID: 519 - Name: Multiplier BG - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 0.400000006, y: 0.400000006, z: 0.98999995} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 4.26499987, y: 2, z: 1} - IsActive: true - Renderable Component: - Mesh: 141771688 - Material: 133784677 - IsActive: true - UI Component: - Canvas ID: 526 - Hovered: false - Clicked: false - IsActive: true - Scripts: - - Type: FixRotation - Enabled: true -- EID: 521 - Name: Score BG - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: -770, y: 425, z: 59.9999962} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 345.600006, y: 200, z: 60} - IsActive: true - Renderable Component: - Mesh: 141771688 - Material: 127527215 - IsActive: true - UI Component: - Canvas ID: 526 - Hovered: false - Clicked: false - IsActive: true - Scripts: ~ - EID: 66150 Name: ParticlesDeco IsActive: true @@ -9254,8 +9121,12 @@ Rotation Speed: 0 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.0187467411, y: 0.627120614, z: 0.709251106, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.899999976, z: 0} IsActive: true Scripts: ~ @@ -9284,8 +9155,12 @@ Rotation Speed: 0 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.0187467411, y: 0.627120614, z: 0.709251106, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0.100000001, z: 0} IsActive: true Scripts: ~ @@ -9314,8 +9189,12 @@ Rotation Speed: 0 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.0187467411, y: 0.627120614, z: 0.709251106, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.100000001, z: 0} IsActive: true Scripts: ~ @@ -9440,4 +9319,190 @@ Scripts: - Type: SHADE_Scripting.Gameplay.AIBehaviour.AIRework.HomeOwnerAttackHitbox Enabled: true - aiGO: 65771 \ No newline at end of file + aiGO: 65771 +- EID: 131271 + Name: Gameplay Canvas + IsActive: true + NumberOfChildren: 4 + Components: + Canvas Component: + Canvas Width: 1920 + Canvas Height: 1080 + Scale by canvas width: false + IsActive: true + Scripts: ~ +- EID: 237 + Name: Score Text + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -800, y: 365, z: 0.600000024} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 100, y: 100, z: 60} + IsActive: true + Text Renderer Component: + Text: My name is Brandon. + Font: 174412429 + Color: {x: 1, y: 1, z: 1, w: 1} + Text Size: {x: 1, y: 1, z: 1} + IsActive: true + UI Component: + Canvas ID: 131271 + Hovered: false + Clicked: false + IsActive: true + Scripts: + - Type: SHADE_Scripting.UI.ScoreTextDigitPositioning + Enabled: true + offsetPerDigit: 25 + - Type: SHADE_Scripting.UI.SingleScaleBounce + Enabled: true + durationUp: 0.150000006 + durationDown: 0.300000012 + scaleSize: 1.20000005 +- EID: 131278 + Name: Timer Text + IsActive: true + NumberOfChildren: 2 + Components: + Transform Component: + Translate: {x: 700, y: 400, z: 0.600000024} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 60, y: 60, z: 1} + IsActive: true + Text Renderer Component: + Text: My name is Brandon. + Font: 174412429 + Color: {x: 1, y: 1, z: 1, w: 1} + Text Size: {x: 1, y: 1, z: 1} + IsActive: true + UI Component: + Canvas ID: 131271 + Hovered: false + Clicked: false + IsActive: true + Scripts: + - Type: SHADE_Scripting.UI.GameTimer + Enabled: true + criticalTime: 30 + timer: 0 + - Type: SHADE_Scripting.UI.ScaleBounce + Enabled: true + minScale: 1 + maxScale: 1.20000005 + duration: 1 + isActive: false +- EID: 520 + Name: Timer BG + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0.300000012, z: 0.98999995} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 5, y: 2, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 126220632 + IsActive: true + UI Component: + Canvas ID: 131271 + Hovered: false + Clicked: false + IsActive: true + Scripts: ~ +- EID: 131211 + Name: Minus Timer Text + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: -0.800000012, z: 0.100000001} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Text Renderer Component: + Text: -10 + Font: 174412429 + Color: {x: 1, y: 0, z: 0, w: 1} + Text Size: {x: 1, y: 1, z: 1} + IsActive: false + UI Component: + Canvas ID: 131271 + Hovered: false + Clicked: false + IsActive: false + Scripts: + - Type: SHADE_Scripting.UI.MinusTimerText + Enabled: true + duration: 2 +- EID: 66055 + Name: Multiplier Text + IsActive: true + NumberOfChildren: 1 + Components: + Transform Component: + Translate: {x: -800, y: 200, z: 0.100000001} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 50, y: 50, z: 60} + IsActive: true + Text Renderer Component: + Text: X2 + Font: 174412429 + Color: {x: 1, y: 1, z: 1, w: 1} + Text Size: {x: 1, y: 1, z: 1} + IsActive: true + UI Component: + Canvas ID: 131271 + Hovered: false + Clicked: false + IsActive: true + Scripts: + - Type: SHADE_Scripting.UI.MultiplierTextFx + Enabled: true + maxSize: 1.5 + minSize: 1 +- EID: 131593 + Name: Multiplier BG + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.400000006, y: 0.400000006, z: 0.98999995} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 4.26499987, y: 2, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 133784677 + IsActive: true + UI Component: + Canvas ID: 131271 + Hovered: false + Clicked: false + IsActive: true + Scripts: + - Type: FixRotation + Enabled: true +- EID: 568 + Name: Score BG + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -770, y: 425, z: 59.9999962} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 345.600006, y: 200, z: 60} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 127527215 + IsActive: true + UI Component: + Canvas ID: 131271 + Hovered: false + Clicked: false + IsActive: true + Scripts: ~ \ No newline at end of file diff --git a/Assets/Scenes/Level3.shade b/Assets/Scenes/Level3.shade index 8abc90a3..394523f4 100644 --- a/Assets/Scenes/Level3.shade +++ b/Assets/Scenes/Level3.shade @@ -9059,9 +9059,9 @@ Score: 0 timer: 200 scoreText: 237 - timeText: 525 - minusTimerText: 524 - multiplierText: 521 + timeText: 66135 + minusTimerText: 66057 + multiplierText: 66055 maxMultiplierDuration: 5 maxMultiplierCombo: 10 multiplierFont: 60 @@ -9166,8 +9166,12 @@ Rotation Speed: 0.0500000007 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 37407233 Color Tint: {x: 0, y: 0, z: 0, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0299999993, z: 0} IsActive: true Scripts: ~ @@ -9260,8 +9264,12 @@ Rotation Speed: 0.0500000007 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 37407233 Color Tint: {x: 0, y: 0, z: 0, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0299999993, z: 0} IsActive: true Scripts: ~ @@ -9354,8 +9362,12 @@ Rotation Speed: 0.0500000007 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 37407233 Color Tint: {x: 0, y: 0, z: 0, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0299999993, z: 0} IsActive: true Scripts: ~ @@ -9501,8 +9513,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.876652002, y: 0.485357881, z: 0.166061834, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -9572,8 +9588,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.876652002, y: 0.485357881, z: 0.166061834, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -9643,8 +9663,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.876652002, y: 0.485357881, z: 0.166061834, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -9714,8 +9738,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.876652002, y: 0.485357881, z: 0.166061834, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -9785,8 +9813,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.876652002, y: 0.485357881, z: 0.166061834, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -9856,8 +9888,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.876652002, y: 0.485357881, z: 0.166061834, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -9927,8 +9963,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.876652002, y: 0.485357881, z: 0.166061834, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -9998,8 +10038,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -10069,8 +10113,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -10140,8 +10188,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -10211,8 +10263,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -10282,8 +10338,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -10353,8 +10413,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -10424,8 +10488,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -10495,8 +10563,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.279913902, y: 0.845814943, z: 0.0856993049, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -10566,8 +10638,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.977993011, y: 1, z: 0.286343634, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -10637,8 +10713,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.977993011, y: 1, z: 0.286343634, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -10708,8 +10788,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.977993011, y: 1, z: 0.286343634, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -10779,8 +10863,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.977993011, y: 1, z: 0.286343634, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.0199999996, z: 0} IsActive: true Scripts: @@ -10850,8 +10938,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 1, y: 1, z: 1, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.00999999978, z: 0} IsActive: true Scripts: @@ -11094,8 +11186,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.290321946, y: 0.823788524, z: 0.323222876, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -11170,8 +11266,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.290321946, y: 0.823788524, z: 0.323222876, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -11241,8 +11341,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.290321946, y: 0.823788524, z: 0.323222876, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -11312,8 +11416,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.290321946, y: 0.823788524, z: 0.323222876, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -11383,8 +11491,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.290321946, y: 0.823788524, z: 0.323222876, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -11454,8 +11566,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.290321946, y: 0.823788524, z: 0.323222876, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -11525,8 +11641,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.290321946, y: 0.823788524, z: 0.323222876, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -11601,8 +11721,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.290321946, y: 0.823788524, z: 0.323222876, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -11672,8 +11796,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.290321946, y: 0.823788524, z: 0.323222876, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -11743,8 +11871,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.290321946, y: 0.823788524, z: 0.323222876, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -11814,8 +11946,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.290321946, y: 0.823788524, z: 0.323222876, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -11885,8 +12021,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.290321946, y: 0.823788524, z: 0.323222876, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0, z: 0} IsActive: true Scripts: @@ -11983,8 +12123,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 1, y: 1, z: 1, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.00999999978, z: 0} IsActive: true Scripts: @@ -12227,8 +12371,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 1, y: 1, z: 1, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.00999999978, z: 0} IsActive: true Scripts: @@ -12471,8 +12619,12 @@ Rotation Speed: 0.100000001 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 1, y: 1, z: 1, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.00999999978, z: 0} IsActive: true Scripts: @@ -12912,8 +13064,12 @@ Rotation Speed: 0.805999994 Rotation Decay: 0 Texture Asset ID: 56224060 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 42141152 Color Tint: {x: 1, y: 1, z: 1, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0.0500000007, z: 0} IsActive: true Scripts: ~ @@ -12942,8 +13098,12 @@ Rotation Speed: 0.805999994 Rotation Decay: 0 Texture Asset ID: 56224060 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 42141152 Color Tint: {x: 1, y: 1, z: 1, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0.0500000007, z: 0} IsActive: true Scripts: ~ @@ -15064,183 +15224,6 @@ Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true Scripts: ~ -- EID: 526 - Name: Gameplay Canvas - IsActive: true - NumberOfChildren: 4 - Components: - Canvas Component: - Canvas Width: 1920 - Canvas Height: 1080 - Scale by canvas width: false - IsActive: true - Scripts: ~ -- EID: 237 - Name: Score Text - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: -800, y: 365, z: 0.600000024} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 100, y: 100, z: 60} - IsActive: true - Text Renderer Component: - Text: My name is Brandon. - Font: 174412429 - Color: {x: 1, y: 1, z: 1, w: 1} - Text Size: {x: 1, y: 1, z: 1} - IsActive: true - UI Component: - Canvas ID: 526 - Hovered: false - Clicked: false - IsActive: true - Scripts: - - Type: SHADE_Scripting.UI.ScoreTextDigitPositioning - Enabled: true - offsetPerDigit: 25 - - Type: SHADE_Scripting.UI.SingleScaleBounce - Enabled: true - durationUp: 0.150000006 - durationDown: 0.300000012 - scaleSize: 1.20000005 -- EID: 525 - Name: Timer Text - IsActive: true - NumberOfChildren: 2 - Components: - Transform Component: - Translate: {x: 700, y: 400, z: 0.600000024} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 60, y: 60, z: 1} - IsActive: true - Text Renderer Component: - Text: My name is Brandon. - Font: 174412429 - Color: {x: 1, y: 1, z: 1, w: 1} - Text Size: {x: 1, y: 1, z: 1} - IsActive: true - UI Component: - Canvas ID: 526 - Hovered: false - Clicked: false - IsActive: true - Scripts: ~ -- EID: 520 - Name: Timer BG - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 0.5, y: 0.300000012, z: 0.98999995} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 5, y: 2, z: 1} - IsActive: true - Renderable Component: - Mesh: 141771688 - Material: 126220632 - IsActive: true - UI Component: - Canvas ID: 526 - Hovered: false - Clicked: false - IsActive: true - Scripts: ~ -- EID: 524 - Name: Minus Timer Text - IsActive: false - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 0, y: -0.800000012, z: 0.100000001} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1, y: 1, z: 1} - IsActive: false - Text Renderer Component: - Text: -10 - Font: 174412429 - Color: {x: 1, y: 0, z: 0, w: 1} - Text Size: {x: 1, y: 1, z: 1} - IsActive: false - UI Component: - Canvas ID: 526 - Hovered: false - Clicked: false - IsActive: false - Scripts: - - Type: SHADE_Scripting.UI.MinusTimerText - Enabled: true - duration: 2 -- EID: 521 - Name: Multiplier Text - IsActive: true - NumberOfChildren: 1 - Components: - Transform Component: - Translate: {x: -800, y: 250, z: 0.100000001} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 50, y: 50, z: 60} - IsActive: true - Text Renderer Component: - Text: X2 - Font: 174412429 - Color: {x: 1, y: 1, z: 1, w: 1} - Text Size: {x: 1, y: 1, z: 1} - IsActive: true - UI Component: - Canvas ID: 526 - Hovered: false - Clicked: false - IsActive: true - Scripts: - - Type: SHADE_Scripting.UI.MultiplierTextFx - Enabled: true - maxSize: 1 - minSize: 0.300000012 - minAlpha: 0.300000012 -- EID: 519 - Name: Multiplier BG - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 0.400000006, y: 0.400000006, z: 0.98999995} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 4.26499987, y: 2, z: 1} - IsActive: true - Renderable Component: - Mesh: 141771688 - Material: 133784677 - IsActive: true - UI Component: - Canvas ID: 526 - Hovered: false - Clicked: false - IsActive: true - Scripts: - - Type: FixRotation - Enabled: true -- EID: 599 - Name: Score BG - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: -770, y: 425, z: 59.9999962} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 345.600006, y: 200, z: 60} - IsActive: true - Renderable Component: - Mesh: 141771688 - Material: 127527215 - IsActive: true - UI Component: - Canvas ID: 526 - Hovered: false - Clicked: false - IsActive: true - Scripts: ~ - EID: 66150 Name: ParticlesDeco IsActive: true @@ -15272,8 +15255,12 @@ Rotation Speed: 0 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.832599103, y: 0.757529616, z: 0.0916959345, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.100000001, z: 0} IsActive: true Scripts: ~ @@ -15302,8 +15289,12 @@ Rotation Speed: 0 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.832599103, y: 0.757529616, z: 0.0916959345, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.100000001, z: 0} IsActive: true Scripts: ~ @@ -15332,8 +15323,12 @@ Rotation Speed: 0 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.832599103, y: 0.757529616, z: 0.0916959345, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.100000001, z: 0} IsActive: true Scripts: ~ @@ -15362,8 +15357,12 @@ Rotation Speed: 0 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.832599103, y: 0.757529616, z: 0.0916959345, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.100000001, z: 0} IsActive: true Scripts: ~ @@ -15392,8 +15391,12 @@ Rotation Speed: 0 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.0187467411, y: 0.627120614, z: 0.709251106, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.100000001, z: 0} IsActive: true Scripts: ~ @@ -15422,8 +15425,12 @@ Rotation Speed: 0 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.832599103, y: 0.757529616, z: 0.0916959345, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.100000001, z: 0} IsActive: true Scripts: ~ @@ -15452,8 +15459,12 @@ Rotation Speed: 0 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.0187467411, y: 0.627120614, z: 0.709251106, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: -0.899999976, z: 0} IsActive: true Scripts: ~ @@ -15482,8 +15493,12 @@ Rotation Speed: 0 Rotation Decay: 0 Texture Asset ID: 0 + Custom Vertex Shader Asset ID: 0 + Custom Fragment Shader Asset ID: 0 Custom Update Shader Asset ID: 0 Color Tint: {x: 0.0187467411, y: 0.627120614, z: 0.709251106, w: 1} + Color Tint Range: {x: 0, y: 0, z: 0, w: 0} + Color Decay: {x: 0, y: 0, z: 0, w: 0} Acceleration: {x: 0, y: 0.100000001, z: 0} IsActive: true Scripts: ~ @@ -15608,4 +15623,190 @@ Scripts: - Type: SHADE_Scripting.Gameplay.AIBehaviour.AIRework.HomeOwnerAttackHitbox Enabled: true - aiGO: 66078 \ No newline at end of file + aiGO: 66078 +- EID: 66062 + Name: Gameplay Canvas + IsActive: true + NumberOfChildren: 4 + Components: + Canvas Component: + Canvas Width: 1920 + Canvas Height: 1080 + Scale by canvas width: false + IsActive: true + Scripts: ~ +- EID: 237 + Name: Score Text + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -800, y: 365, z: 0.600000024} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 100, y: 100, z: 60} + IsActive: true + Text Renderer Component: + Text: My name is Brandon. + Font: 174412429 + Color: {x: 1, y: 1, z: 1, w: 1} + Text Size: {x: 1, y: 1, z: 1} + IsActive: true + UI Component: + Canvas ID: 66062 + Hovered: false + Clicked: false + IsActive: true + Scripts: + - Type: SHADE_Scripting.UI.ScoreTextDigitPositioning + Enabled: true + offsetPerDigit: 25 + - Type: SHADE_Scripting.UI.SingleScaleBounce + Enabled: true + durationUp: 0.150000006 + durationDown: 0.300000012 + scaleSize: 1.20000005 +- EID: 66135 + Name: Timer Text + IsActive: true + NumberOfChildren: 2 + Components: + Transform Component: + Translate: {x: 700, y: 400, z: 0.600000024} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 60, y: 60, z: 1} + IsActive: true + Text Renderer Component: + Text: My name is Brandon. + Font: 174412429 + Color: {x: 1, y: 1, z: 1, w: 1} + Text Size: {x: 1, y: 1, z: 1} + IsActive: true + UI Component: + Canvas ID: 66062 + Hovered: false + Clicked: false + IsActive: true + Scripts: + - Type: SHADE_Scripting.UI.GameTimer + Enabled: true + criticalTime: 30 + timer: 0 + - Type: SHADE_Scripting.UI.ScaleBounce + Enabled: true + minScale: 1 + maxScale: 1.20000005 + duration: 1 + isActive: false +- EID: 520 + Name: Timer BG + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0.300000012, z: 0.98999995} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 5, y: 2, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 126220632 + IsActive: true + UI Component: + Canvas ID: 66062 + Hovered: false + Clicked: false + IsActive: true + Scripts: ~ +- EID: 66057 + Name: Minus Timer Text + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: -0.800000012, z: 0.100000001} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 1, y: 1, z: 1} + IsActive: false + Text Renderer Component: + Text: -10 + Font: 174412429 + Color: {x: 1, y: 0, z: 0, w: 1} + Text Size: {x: 1, y: 1, z: 1} + IsActive: false + UI Component: + Canvas ID: 66062 + Hovered: false + Clicked: false + IsActive: false + Scripts: + - Type: SHADE_Scripting.UI.MinusTimerText + Enabled: true + duration: 2 +- EID: 66055 + Name: Multiplier Text + IsActive: true + NumberOfChildren: 1 + Components: + Transform Component: + Translate: {x: -800, y: 200, z: 0.100000001} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 50, y: 50, z: 60} + IsActive: true + Text Renderer Component: + Text: X2 + Font: 174412429 + Color: {x: 1, y: 1, z: 1, w: 1} + Text Size: {x: 1, y: 1, z: 1} + IsActive: true + UI Component: + Canvas ID: 66062 + Hovered: false + Clicked: false + IsActive: true + Scripts: + - Type: SHADE_Scripting.UI.MultiplierTextFx + Enabled: true + maxSize: 1.5 + minSize: 1 +- EID: 66061 + Name: Multiplier BG + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.400000006, y: 0.400000006, z: 0.98999995} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 4.26499987, y: 2, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 133784677 + IsActive: true + UI Component: + Canvas ID: 66062 + Hovered: false + Clicked: false + IsActive: true + Scripts: + - Type: FixRotation + Enabled: true +- EID: 66060 + Name: Score BG + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -770, y: 425, z: 59.9999962} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 345.600006, y: 200, z: 60} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 127527215 + IsActive: true + UI Component: + Canvas ID: 66062 + Hovered: false + Clicked: false + IsActive: true + Scripts: ~ \ No newline at end of file diff --git a/Assets/Scripts/UI/SC_ScaleBounce.cs b/Assets/Scripts/UI/SC_ScaleBounce.cs index 31b43671..d6ec4792 100644 --- a/Assets/Scripts/UI/SC_ScaleBounce.cs +++ b/Assets/Scripts/UI/SC_ScaleBounce.cs @@ -7,19 +7,21 @@ using System.Threading.Tasks; namespace SHADE_Scripting.UI { - public class ScaleBounce:Script - { - [NonSerialized] - private TweenThread thread; + public class ScaleBounce : Script + { + [NonSerialized] + private TweenThread thread; - public float minScale = 1.0f; - public float maxScale = 1.2f; - public float duration = 1.0f; + public float minScale = 1.0f; + public float maxScale = 1.2f; + public float duration = 1.0f; - private Vector3 defaultScale; + private Vector3 defaultScale; - public bool isActive = true; + public bool isActive = false; + + private bool lastActive = false; protected override void start() { @@ -33,6 +35,13 @@ namespace SHADE_Scripting.UI protected override void update() { + + if(isActive != lastActive && isActive == true) + { + thread.Reset(); + } + lastActive = isActive; + Transform trans = GetComponent(); if(trans != null && isActive) {