Some Entities for endscreen and some basic logic in the EndScreenSystem

This commit is contained in:
Tleety
2016-03-12 15:45:07 +01:00
parent 4334ea067e
commit 8c2a665ccb
10 changed files with 154 additions and 32 deletions
+21
View File
@@ -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<EndScreenSystem, Events::Win&> m_EWin;
bool OnWin(const Events::Win&);
};
#endif
-17
View File
@@ -1,17 +0,0 @@
#ifndef WinScreenSystem_h__
#define WinScreenSystem_h__
#include "Core/System.h"
#include "Input/EInputCommand.h"
class WinScreenSystem : public ImpureSystem
{
public:
WinScreenSystem(SystemParams params);
virtual void Update(double dt) override;
private:
};
#endif
+1
View File
@@ -68,4 +68,5 @@
<xs:include schemaLocation="Components/NetworkComponent.xsd"/>
<xs:include schemaLocation="Components/ServerIdentity.xsd"/>
<xs:include schemaLocation="Components/ServerList.xsd"/>
<xs:include schemaLocation="Components/EndScreen.xsd"/>
</xs:schema>
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<EndScreen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="EndScreen.xsd">
</EndScreen>
+10
View File
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
<xs:element name="EndScreen">
<xs:annotation>
<xs:documentation>Put this on the camera that will show the final screen.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:schema>
+88
View File
@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="EndScreen_Origin" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Transform>
<Position X="0" Y="3.10000014" Z="42.9360008"/>
</c:Transform>
</Components>
<Children>
<Entity name="Camera">
<Components>
<c:Camera/>
<c:Transform/>
</Components>
<Children>
<Entity name="Sprite_Origin">
<Components>
<c:Transform>
<Position X="0" Y="0.65200001" Z="-1.72800004"/>
</c:Transform>
</Components>
<Children>
<Entity name="SpriteBlue">
<Components>
<c:Sprite>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
<BlurBackground>true</BlurBackground>
<Color A="0.392156869" B="0.196078435" G="0" R="0"/>
<Visible>false</Visible>
</c:Sprite>
<c:Transform>
<Scale X="1.30000007" Y="0.300000012" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="TextBlue">
<Components>
<c:Text>
<Content>Blue team win!</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Visible>false</Visible>
</c:Text>
<c:Transform>
<Position X="0" Y="-0.0670000017" Z="0.0299999993"/>
<Scale X="0.150000006" Y="0.150000006" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="TextRed">
<Components>
<c:Text>
<Content>Red team win!</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
</c:Text>
<c:Transform>
<Position X="0" Y="-0.0670000017" Z="0.0299999993"/>
<Scale X="0.150000006" Y="0.150000006" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="SpriteRed">
<Components>
<c:Sprite>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
<BlurBackground>true</BlurBackground>
<Color A="0.392156869" B="0" G="0" R="0.196078435"/>
</c:Sprite>
<c:Transform>
<Scale X="1.30000007" Y="0.300000012" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
+12 -3
View File
@@ -20,10 +20,10 @@
</Entity>
<Entity name="ScoreBoard_Spectators">
<Components>
<c:Team/>
<c:ScoreScreen>
<Offset X="0" Y="-2" Z="0"/>
</c:ScoreScreen>
<c:Team/>
<c:Transform>
<Position X="0" Y="-15.7886772" Z="1.5"/>
</c:Transform>
@@ -44,7 +44,7 @@
<Entity name="Spawner_1">
<Components>
<c:Spawner>
<EntityFile></EntityFile>
<EntityFile>Schema/Entities/ScoreBoard_Red.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="16.5" Y="0" Z="0"/>
@@ -55,7 +55,7 @@
<Entity name="Spawner_2">
<Components>
<c:Spawner>
<EntityFile></EntityFile>
<EntityFile>Schema/Entities/ScoreBoard_Blue.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="-16.5" Y="0" Z="0"/>
@@ -63,6 +63,15 @@
</Components>
<Children/>
</Entity>
<Entity name="EndScreenCameraSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/EndScreen.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
+1
View File
@@ -71,6 +71,7 @@
<xs:element ref="c:NetworkComponent" minOccurs="0"/>
<xs:element ref="c:ServerIdentity" minOccurs="0"/>
<xs:element ref="c:ServerList" minOccurs="0"/>
<xs:element ref="c:EndScreen" minOccurs="0"/>
</xs:all>
</xs:complexType>
</xs:element>
+18
View File
@@ -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&)
{
}
-12
View File
@@ -1,12 +0,0 @@
#include "Systems/WinScreenSystem.h"
#include "Rendering/ESetCamera.h"
#include "Core/ELockMouse.h"
WinScreenSystem::WinScreenSystem(SystemParams params)
: System(params)
{
}
void WinScreenSystem::Update(double dt)
{
}