diff --git a/assets b/assets index 69ddae17..40f6ae62 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 69ddae179ac02d5c1582a8c6834451b3f5e4bbaf +Subproject commit 40f6ae6201adb94e99ee084b081fc8467f80953a diff --git a/include/Game/Systems/EndScreenSystem.h b/include/Game/Systems/EndScreenSystem.h new file mode 100644 index 00000000..ec4702ca --- /dev/null +++ b/include/Game/Systems/EndScreenSystem.h @@ -0,0 +1,21 @@ +#ifndef EndScreenSystem_h__ +#define EndScreenSystem_h__ + +#include "Core/System.h" +#include "Input/EInputCommand.h" +#include "Rendering/ESetCamera.h" +#include "Core/EWin.h" + +class EndScreenSystem : public ImpureSystem +{ +public: + EndScreenSystem(SystemParams params); + + virtual void Update(double dt) override; + +private: + EventRelay m_EWin; + bool OnWin(const Events::Win&); +}; + +#endif \ No newline at end of file diff --git a/resources/Schema/Components.xsd b/resources/Schema/Components.xsd index bc6da932..f124272f 100644 --- a/resources/Schema/Components.xsd +++ b/resources/Schema/Components.xsd @@ -68,4 +68,5 @@ + \ No newline at end of file diff --git a/resources/Schema/Components/EndScreen.xml b/resources/Schema/Components/EndScreen.xml new file mode 100644 index 00000000..8a556256 --- /dev/null +++ b/resources/Schema/Components/EndScreen.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/resources/Schema/Components/EndScreen.xsd b/resources/Schema/Components/EndScreen.xsd new file mode 100644 index 00000000..9056f210 --- /dev/null +++ b/resources/Schema/Components/EndScreen.xsd @@ -0,0 +1,10 @@ + + + + + + + Put this on the camera that will show the final screen. + + + \ No newline at end of file diff --git a/resources/Schema/Entities/EndScreen.xml b/resources/Schema/Entities/EndScreen.xml new file mode 100644 index 00000000..11ddc201 --- /dev/null +++ b/resources/Schema/Entities/EndScreen.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/Core/White.png + true + + false + + + + + + + + + + + Blue team win! + Fonts/DroidSans.ttf,64 + false + + + + + + + + + + + + Red team win! + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/Core/White.png + true + + + + + + + + + + + + + + + diff --git a/resources/Schema/Entities/PlayerHUD.xml b/resources/Schema/Entities/PlayerHUD.xml index cf07bc56..5891362d 100644 --- a/resources/Schema/Entities/PlayerHUD.xml +++ b/resources/Schema/Entities/PlayerHUD.xml @@ -11,9 +11,10 @@ - Textures/Weapons/Crosshair/SmallThickHoleDot.png - false + Models/Core/UnitQuad.mesh + + Textures/Weapons/Crosshair/SmallThickHoleDot.png @@ -42,10 +43,52 @@ - Textures/Core/UnitHexagon.png - false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon.png + true + + + + + + + + + + + + + 2 + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon_Rotated.png + true + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon.png + + true @@ -61,9 +104,11 @@ 3 - Textures/Core/UnitHexagon_Rotated.png - false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon_Rotated.png + true @@ -78,10 +123,12 @@ - Textures/Core/UnitHexagon.png - false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon.png + true @@ -98,9 +145,11 @@ 4 - Textures/Core/UnitHexagon_Rotated.png - false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon_Rotated.png + true @@ -115,46 +164,12 @@ - Textures/Core/UnitHexagon.png - false - - - - - - - - - - - - - - 2 - - - Textures/Core/UnitHexagon_Rotated.png - - false - - - - - - - - - - - - - - - Textures/Core/UnitHexagon.png + Models/Core/UnitQuad.mesh - false + Textures/Core/UnitHexagon.png + true @@ -170,9 +185,11 @@ 1 - Textures/Core/UnitHexagon_Rotated.png - false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon_Rotated.png + true @@ -187,10 +204,12 @@ - Textures/Core/UnitHexagon.png - false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon.png + true @@ -205,9 +224,11 @@ - Textures/Core/UnitHexagon_Rotated.png - false + Models/Core/UnitQuad.mesh + + Textures/Core/UnitHexagon_Rotated.png + true @@ -284,10 +305,11 @@ - Models/Widgets/Arrows/Arrow5.mesh + Models/Widgets/Arrows/ArrowBlue.mesh + @@ -310,7 +332,7 @@ 100/100 Fonts/DroidSans.ttf,64 - + @@ -329,9 +351,11 @@ - Textures/HealthHUD3.png + Models/Core/UnitQuad.mesh + Textures/HealthHUD3.png + true @@ -350,16 +374,18 @@ - + - Textures/Icons/Boosts/Assault-01.png - false - + Models/Core/UnitQuad.mesh + + Textures/Icons/Boosts/Assault-01.png + + true - + @@ -369,16 +395,18 @@ - + - Textures/Icons/Boosts/Defender-01.png - false - + Models/Core/UnitQuad.mesh + + Textures/Icons/Boosts/Defender-01.png + + true - + @@ -388,13 +416,16 @@ - + - Textures/Icons/Boosts/Sniper-01.png - false - + Models/Core/UnitQuad.mesh + + Textures/Icons/Boosts/Sniper-01.png + + false + true @@ -413,15 +444,17 @@ - Textures/Icons/Abilities/Superman-01.png - false - + Models/Core/UnitQuad.mesh + + Textures/Test/aM4ME4GR.png + + true - - + + diff --git a/resources/Schema/Entities/ScoreBoard_Main.xml b/resources/Schema/Entities/ScoreBoard_Main.xml index ccc1df68..48d0782f 100644 --- a/resources/Schema/Entities/ScoreBoard_Main.xml +++ b/resources/Schema/Entities/ScoreBoard_Main.xml @@ -20,10 +20,10 @@ + - @@ -44,7 +44,7 @@ - + Schema/Entities/ScoreBoard_Red.xml @@ -55,7 +55,7 @@ - + Schema/Entities/ScoreBoard_Blue.xml @@ -63,6 +63,15 @@ + + + + Schema/Entities/EndScreen.xml + + + + + diff --git a/resources/Schema/Entities/StartMenu_simple.xml b/resources/Schema/Entities/StartMenu_simple.xml new file mode 100644 index 00000000..944c51b5 --- /dev/null +++ b/resources/Schema/Entities/StartMenu_simple.xml @@ -0,0 +1,440 @@ + + + + + + + + + + + + + + + + + Schema/Entities/NewMap2version5NEW.xml + + + + + + + + + + + + + + + + 0.10000000149011612 + + + + + + + + + + + 0.20000000298023224 + + + + + + + + + + + + + + + + + + + + + + + + + Schema/Entities/MainMenu.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/White.png + true + + + + Play + 1 + + + + + + + + + + + Play + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/White.png + true + + + + + + + + + + + + Credits + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + + + + + + + + + + + + + + + + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/White.png + true + + + + + + + + + + + + Option + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + + false + Models/Core/UnitQuad.mesh + + Textures/Core/White.png + true + + + + + + + + + + + + Quit + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + + + + + + + + + + + + + Models/Core/UnitQuad.mesh + + Textures/HUD/ButtonCorner_16.png + + + + + + + + + + + + + + + + + + + + + + + + + Schema/Entities/ServerList.xml + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/Schema/Types/Entity.xsd b/resources/Schema/Types/Entity.xsd index c0ac15aa..2d24590c 100644 --- a/resources/Schema/Types/Entity.xsd +++ b/resources/Schema/Types/Entity.xsd @@ -71,6 +71,7 @@ + diff --git a/resources/Shaders/Sprite.frag.glsl b/resources/Shaders/Sprite.frag.glsl index 5b6567eb..6a7169e1 100644 --- a/resources/Shaders/Sprite.frag.glsl +++ b/resources/Shaders/Sprite.frag.glsl @@ -29,9 +29,9 @@ void main() vec4 color_result = Color * diffuseTexel; float pos = ((P * vec4(Input.Position, 1)).y + 1.0)/2.0; - float fillResult = floor(pos*FillPercentage); + float fillResult = clamp(floor(pos/FillPercentage), 0, 1); - color_result = FillColor*diffuseTexel.a*fillResult + color_result*(1-fillResult); + color_result = FillColor*diffuseTexel.a*(1 - fillResult) + color_result*fillResult; sceneColor = vec4(color_result.xyz, clamp(color_result.a, 0, 1)); diff --git a/src/Game/Systems/AbilityCooldownHUDSystem.cpp b/src/Game/Systems/AbilityCooldownHUDSystem.cpp index 07461f95..23e9a6b7 100644 --- a/src/Game/Systems/AbilityCooldownHUDSystem.cpp +++ b/src/Game/Systems/AbilityCooldownHUDSystem.cpp @@ -23,26 +23,29 @@ void AbilityCooldownHUDSystem::Update(double dt) if (!abilityEntity.Valid()) { //If we dont have a shield ability, we return, since we cannot do anything. + if (entity.HasComponent("Sprite")) { + (std::string&)entity["Sprite"]["DiffuseTexture"] = "Textures/Test/aM4ME4GR.png"; + } return; } else { //If we have a shield ability, we set the right icon abilityName = "ShieldAbility"; if (entity.HasComponent("Sprite")) { - (std::string&)entity["Sprite"]["DiffuseTexture"] = "Textures\\Icons\\Abilities\\SheildDots-01.png"; + (std::string&)entity["Sprite"]["DiffuseTexture"] = "Textures/Icons/Abilities/Long/SheildDots-01.png"; } } } else { //If we do have a sprint ability, we change the icon abilityName = "SprintAbility"; if (entity.HasComponent("Sprite")) { - (std::string&)entity["Sprite"]["DiffuseTexture"] = "Textures\\Icons\\Abilities\\Dash-01.png"; + (std::string&)entity["Sprite"]["DiffuseTexture"] = "Textures/Icons/Abilities/Long/Dash-01.png"; } } } else { //If we have a dash ability, we set the icon to the correct one. abilityName = "DashAbility"; if (entity.HasComponent("Sprite")) { - (std::string&)entity["Sprite"]["DiffuseTexture"] = "Textures\\Icons\\Abilities\\Superman-01.png"; + (std::string&)entity["Sprite"]["DiffuseTexture"] = "Textures/Icons/Abilities/Long/Superman-01.png"; } } @@ -63,12 +66,12 @@ void AbilityCooldownHUDSystem::Update(double dt) } if (abilityName == "ShieldAbility") { - maxAbilityCD = 0.0; + maxAbilityCD = 1.0; currentAbilityCD = 1 - (bool)abilityEntity[abilityName]["Active"]; } if (abilityName == "SprintAbility") { - maxAbilityCD = 0.0; + maxAbilityCD = 1.0; currentAbilityCD = 1 - (bool)abilityEntity[abilityName]["Active"]; } diff --git a/src/Game/Systems/EndScreenSystem.cpp b/src/Game/Systems/EndScreenSystem.cpp new file mode 100644 index 00000000..e750cca3 --- /dev/null +++ b/src/Game/Systems/EndScreenSystem.cpp @@ -0,0 +1,18 @@ +#include "Systems/EndScreenSystem.h" + + +EndScreenSystem::EndScreenSystem(SystemParams params) + : System(params) +{ + EVENT_SUBSCRIBE_MEMBER(m_EWin, &EndScreenSystem::OnWin); +} + +void EndScreenSystem::Update(double dt) +{ + +} + +bool EndScreenSystem::OnWin(const Events::Win&) +{ + +}