Added LifeTimeOfEffect in BoostAssault,BoostDefender components.
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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"];
|
||||
|
||||
Reference in New Issue
Block a user