Added some fields in score components to track more data. Added some logic to the ScoreSystem class

This commit is contained in:
Tleety
2016-03-03 09:49:20 +01:00
parent 40c66f76ae
commit 27d3ec4118
6 changed files with 81 additions and 7 deletions
@@ -1,3 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ScoreIdentity xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ScoreIdentity.xsd">
<Name></Name>
<ID>-1</ID>
<KD>0.0</KD>
<Kills>0</Kills>
<Deaths>0</Deaths>
<Ping>0</Ping>
<Connected>true</Connected>
</ScoreIdentity>
@@ -4,6 +4,9 @@
<xs:element name="ScoreIdentity">
<xs:annotation><xs:documentation>A component tracking data for the score of a player.</xs:documentation></xs:annotation>
<xs:element name="Name" type="t:string" minOccurs="0"/>
<xs:element name="ID" type="t:int" minOccurs="0">
<xs:annotation><xs:documentation>A unique id for tracking identities</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="KD" type="t:double" minOccurs="0">
<xs:annotation><xs:documentation>The Kills per death score.</xs:documentation></xs:annotation>
</xs:element>
@@ -16,5 +19,8 @@
<xs:element name="Ping" type="t:int" minOccurs="0">
<xs:annotation><xs:documentation>Ping of a player.</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="Connected" type="t:Bool" minOccurs="0">
<xs:annotation><xs:documentation>If the player is currently connected or not</xs:documentation></xs:annotation>
</xs:element>
</xs:element>
</xs:schema>
@@ -1,3 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ScoreScreen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ScoreScreen.xsd">
<TotalIdentities>0</TotalIdentities>
<NextPosition>0</NextPosition>
</ScoreScreen>
+7 -4
View File
@@ -1,10 +1,13 @@
<?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="ScoreScreen">
<xs:annotation>
<xs:documentation>The screen where player scores will be shown.</xs:documentation>
</xs:annotation>
<xs:annotation><xs:documentation>The screen where player scores will be shown.</xs:documentation></xs:annotation>
<xs:element name="TotalIdentities" type="t:int" minOccurs="0">
<xs:annotation><xs:documentation>The amount of score identities this scoreboard hold</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="NextPosition" type="t:int" minOccurs="0">
<xs:annotation><xs:documentation>Where the next scoreIdentity should be placed.</xs:documentation></xs:annotation>
</xs:element>
</xs:element>
</xs:schema>