Added LifeTimeOfEffect in BoostAssault,BoostDefender components.

This commit is contained in:
verysecrethero
2016-02-17 16:43:38 +01:00
parent 1c9a1a9904
commit 56bc1fee3d
5 changed files with 10 additions and 27 deletions
+2 -13
View File
@@ -1,16 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<BoostAssault xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BoostAssault.xsd">
<Components>
<c:BoostAssault>
<StrengthOfEffect>5</StrengthOfEffect>
</c:BoostAssault>
<c:Lifetime>
<Lifetime>5</Lifetime>
</c:Lifetime>
<c:Transform/>
</Components>
<Children/>
<StrengthOfEffect>2</StrengthOfEffect>
<LifeTimeOfEffect>5</LifeTimeOfEffect>
</BoostAssault>
@@ -12,6 +12,9 @@
<xs:element name="StrengthOfEffect" type="t:double" minOccurs="0">
<xs:annotation><xs:documentation>This is the strength of the boost effect</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="LifeTimeOfEffect" type="t:double" minOccurs="0">
<xs:annotation><xs:documentation>How long the effect lasts</xs:documentation></xs:annotation>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
+2 -13
View File
@@ -1,16 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<BoostDefender xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BoostDefender.xsd">
<Components>
<c:BoostDefender>
<StrengthOfEffect>10</StrengthOfEffect>
</c:BoostDefender>
<c:Lifetime>
<Lifetime>5</Lifetime>
</c:Lifetime>
<c:Transform/>
</Components>
<Children/>
<StrengthOfEffect>10</StrengthOfEffect>
<LifeTimeOfEffect>5</LifeTimeOfEffect>
</BoostDefender>
@@ -12,6 +12,9 @@
<xs:element name="StrengthOfEffect" type="t:double" minOccurs="0">
<xs:annotation><xs:documentation>This is the strength of the boost effect</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="LifeTimeOfEffect" type="t:double" minOccurs="0">
<xs:annotation><xs:documentation>How long the effect lasts</xs:documentation></xs:annotation>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
@@ -109,7 +109,6 @@ void PlayerMovementSystem::updateMovementControllers(double dt)
//if doubleTapped do Assault Dash - but only boost maximum 50.0f
float doubleTapDashBoost = controller->AssaultDashDoubleTapped() ? 40.0f : 1.0f;
accelerationSpeed = glm::min(doubleTapDashBoost*glm::min(accelerationSpeed, addSpeed), 50.0f);
accelerationSpeed = doubleTapDashBoost*glm::min(accelerationSpeed, addSpeed);
//if player has Boost from an Assault class, accelerate the player faster
if (player.HasComponent("BoostAssault")) {
accelerationSpeed *= (double)player["BoostAssault"]["StrengthOfEffect"];