xml/xsd files changed type to double. fixed cooldownbug in PlayerSystem. Added 4 tests in ShootEventTest and generalized it a lot

This commit is contained in:
verysecrethero
2016-01-11 13:34:50 +01:00
parent 184af95507
commit ec4d5fbfa8
8 changed files with 228 additions and 53 deletions
+4 -1
View File
@@ -4,6 +4,9 @@
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
<xs:element name="Player">
<xs:annotation>
<xs:documentation>The player charachter</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:all>
<xs:element name="Velocity" type="t:Vector" minOccurs="0"/>
@@ -11,7 +14,7 @@
<xs:element name="Left" type="t:bool" minOccurs="0"/>
<xs:element name="Back" type="t:bool" minOccurs="0"/>
<xs:element name="Right" type="t:bool" minOccurs="0"/>
<xs:element name="EquippedItem" type="t:int" minOccurs="0"/>
<xs:element name="EquippedItem" type="t:double" minOccurs="0"/>
</xs:all>
</xs:complexType>
</xs:element>
+1 -1
View File
@@ -1,4 +1,4 @@
<c:PrimaryItem>
<Ammo>0</Ammo>
<CoolDownTimer>0</CoolDownTimer>
</c:Player>
</c:PrimaryItem>
+9 -2
View File
@@ -4,10 +4,17 @@
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
<xs:element name="PrimaryItem">
<xs:annotation>
<xs:documentation>The Players Primary Item/Weapon</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:all>
<xs:element name="Ammo" type="t:int" minOccurs="0"/>
<xs:element name="CoolDownTimer" type="t:double" minOccurs="0"/>
<xs:element name="Ammo" type="t:double" minOccurs="0">
<xs:annotation><xs:documentation>Ammo count</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="CoolDownTimer" type="t:double" minOccurs="0">
<xs:annotation><xs:documentation>Cooldown till next item/weapon use</xs:documentation></xs:annotation>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
@@ -1,4 +1,4 @@
<c:SecondaryItem>
<Ammo>0</Ammo>
<CoolDownTimer>0</CoolDownTimer>
</c:Player>
</c:SecondaryItem>
@@ -4,10 +4,17 @@
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
<xs:element name="SecondaryItem">
<xs:annotation>
<xs:documentation>The Players Secondary Item/Weapon</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:all>
<xs:element name="Ammo" type="t:int" minOccurs="0"/>
<xs:element name="CoolDownTimer" type="t:double" minOccurs="0"/>
<xs:element name="Ammo" type="t:double" minOccurs="0">
<xs:annotation><xs:documentation>Ammo count</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="CoolDownTimer" type="t:double" minOccurs="0">
<xs:annotation><xs:documentation>Cooldown till next item/weapon use</xs:documentation></xs:annotation>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>