Next CP indicator should now be fully working.

This commit is contained in:
Tleety
2016-03-01 22:54:13 +01:00
parent ab40fa715b
commit 799990f44d
6 changed files with 9354 additions and 28 deletions
+1 -1
Submodule assets updated: 10a611659d...72530423ad
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+41 -20
View File
@@ -13,7 +13,7 @@
</c:AssaultWeapon> </c:AssaultWeapon>
<c:Collidable/> <c:Collidable/>
<c:DefenderWeapon> <c:DefenderWeapon>
<TimeSinceLastFire>1.6944730461160304</TimeSinceLastFire> <TimeSinceLastFire>23.911064541134579</TimeSinceLastFire>
</c:DefenderWeapon> </c:DefenderWeapon>
<c:DoubleJump/> <c:DoubleJump/>
<c:Health/> <c:Health/>
@@ -193,7 +193,6 @@
<CapturePointNumber>3</CapturePointNumber> <CapturePointNumber>3</CapturePointNumber>
</c:CapturePointHUD> </c:CapturePointHUD>
<c:Fill> <c:Fill>
<Percentage>0.80222018197612788</Percentage>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/> <Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill> </c:Fill>
<c:Sprite> <c:Sprite>
@@ -228,6 +227,7 @@
<CapturePointNumber>4</CapturePointNumber> <CapturePointNumber>4</CapturePointNumber>
</c:CapturePointHUD> </c:CapturePointHUD>
<c:Fill> <c:Fill>
<Percentage>1</Percentage>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/> <Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill> </c:Fill>
<c:Sprite> <c:Sprite>
@@ -283,7 +283,7 @@
<c:Sprite> <c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture> <DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<GlowMap></GlowMap> <GlowMap></GlowMap>
<Color A="0.699999988" B="0" G="0.200000003" R="1"/> <Color A="0.699999988" B="0" G="0" R="1"/>
</c:Sprite> </c:Sprite>
<c:Transform> <c:Transform>
<Position X="-1.58304751" Y="0.919596612" Z="0"/> <Position X="-1.58304751" Y="0.919596612" Z="0"/>
@@ -294,7 +294,8 @@
<Components> <Components>
<c:CapturePointHUD/> <c:CapturePointHUD/>
<c:Fill> <c:Fill>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/> <Percentage>1</Percentage>
<Color A="0.699999988" B="0" G="0" R="1"/>
</c:Fill> </c:Fill>
<c:Sprite> <c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture> <DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
@@ -303,7 +304,7 @@
<c:Transform> <c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/> <Position X="0" Y="0" Z="0.00999999978"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/> <Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
<Orientation X="0" Y="0" Z="1.57079637"/> <Orientation X="0" Y="0" Z="4.71238899"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children/> <Children/>
@@ -372,7 +373,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName1>Idle</AnimationName1> <AnimationName1>Idle</AnimationName1>
<Time1>0.67172915251515519</Time1> <Time1>0.22110820884665827</Time1>
<Speed1>1</Speed1> <Speed1>1</Speed1>
<AnimationName2></AnimationName2> <AnimationName2></AnimationName2>
<AnimationName3></AnimationName3> <AnimationName3></AnimationName3>
@@ -386,30 +387,49 @@
<Children> <Children>
<Entity name="PrimaryAttachment"> <Entity name="PrimaryAttachment">
<Components> <Components>
<c:WeaponAttachment>
<Weapon>DefenderWeapon</Weapon>
</c:WeaponAttachment>
<c:Spawner> <c:Spawner>
<EntityFile>Schema/Entities/DefenderWeaponView.xml</EntityFile> <EntityFile>Schema/Entities/DefenderWeaponView.xml</EntityFile>
</c:Spawner> </c:Spawner>
<c:Transform/> <c:Transform/>
<c:WeaponAttachment>
<Weapon>DefenderWeapon</Weapon>
</c:WeaponAttachment>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="SecondaryAttachment"> <Entity name="SecondaryAttachment">
<Components> <Components>
<c:WeaponAttachment>
<Weapon>AssaultWeapon</Weapon>
</c:WeaponAttachment>
<c:Spawner> <c:Spawner>
<EntityFile>Schema/Entities/AssaultWeaponView.xml</EntityFile> <EntityFile>Schema/Entities/AssaultWeaponView.xml</EntityFile>
</c:Spawner> </c:Spawner>
<c:Transform/> <c:Transform/>
<c:WeaponAttachment>
<Weapon>AssaultWeapon</Weapon>
</c:WeaponAttachment>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
</Children> </Children>
</Entity> </Entity>
<Entity name="CapturePointIndicator">
<Components>
<c:CapturePointArrowHUD/>
<c:Model>
<Resource>Models/Widgets/Arrows/Arrow10.mesh</Resource>
</c:Model>
<c:Team>
<Team>
<Blue/>
</Team>
</c:Team>
<c:Transform>
<Position X="0" Y="0.118000008" Z="-0.354000002"/>
<Scale X="0.200000003" Y="0.200000003" Z="0.200000003"/>
<Orientation X="-0.0286321267" Y="-1.85983479" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children> </Children>
</Entity> </Entity>
<Entity name="ThirdPersonCamera"> <Entity name="ThirdPersonCamera">
@@ -430,6 +450,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName1>Idle</AnimationName1> <AnimationName1>Idle</AnimationName1>
<Time1>1.6993789132803556</Time1>
<Speed1>1</Speed1> <Speed1>1</Speed1>
<AnimationName2></AnimationName2> <AnimationName2></AnimationName2>
<AnimationName3></AnimationName3> <AnimationName3></AnimationName3>
@@ -449,31 +470,31 @@
<Children> <Children>
<Entity name="PrimaryAttachment"> <Entity name="PrimaryAttachment">
<Components> <Components>
<c:Spawner>
<EntityFile>Schema/Entities/DefenderWeaponWorld.xml</EntityFile>
</c:Spawner>
<c:Transform/>
<c:WeaponAttachment> <c:WeaponAttachment>
<Weapon>DefenderWeapon</Weapon> <Weapon>DefenderWeapon</Weapon>
<Person> <Person>
<ThirdPerson/> <ThirdPerson/>
</Person> </Person>
</c:WeaponAttachment> </c:WeaponAttachment>
<c:Spawner>
<EntityFile>Schema/Entities/DefenderWeaponWorld.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="SecondaryAttachment"> <Entity name="SecondaryAttachment">
<Components> <Components>
<c:Spawner>
<EntityFile>Schema/Entities/AssaultWeaponWorld.xml</EntityFile>
</c:Spawner>
<c:Transform/>
<c:WeaponAttachment> <c:WeaponAttachment>
<Weapon>AssaultWeapon</Weapon> <Weapon>AssaultWeapon</Weapon>
<Person> <Person>
<ThirdPerson/> <ThirdPerson/>
</Person> </Person>
</c:WeaponAttachment> </c:WeaponAttachment>
<c:Spawner>
<EntityFile>Schema/Entities/AssaultWeaponWorld.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
+5 -4
View File
@@ -13,7 +13,7 @@
</c:AssaultWeapon> </c:AssaultWeapon>
<c:Collidable/> <c:Collidable/>
<c:DefenderWeapon> <c:DefenderWeapon>
<TimeSinceLastFire>326.69883589440087</TimeSinceLastFire> <TimeSinceLastFire>361.81593010381596</TimeSinceLastFire>
</c:DefenderWeapon> </c:DefenderWeapon>
<c:DoubleJump/> <c:DoubleJump/>
<c:Health/> <c:Health/>
@@ -373,7 +373,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName1>Idle</AnimationName1> <AnimationName1>Idle</AnimationName1>
<Time1>0.20909021680133577</Time1> <Time1>1.6231050125476969</Time1>
<Speed1>1</Speed1> <Speed1>1</Speed1>
<AnimationName2></AnimationName2> <AnimationName2></AnimationName2>
<AnimationName3></AnimationName3> <AnimationName3></AnimationName3>
@@ -417,10 +417,11 @@
<c:Model> <c:Model>
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource> <Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
</c:Model> </c:Model>
<c:Team/>
<c:Transform> <c:Transform>
<Position X="-0.200000003" Y="0.150000006" Z="-0.5"/> <Position X="-0.200000003" Y="0.150000006" Z="-0.5"/>
<Scale X="0.300000012" Y="0.300000012" Z="0.300000012"/> <Scale X="0.300000012" Y="0.300000012" Z="0.300000012"/>
<Orientation X="-1.63629317" Y="1.90765047" Z="-0.0229658931"/> <Orientation X="-0.250997096" Y="-0.398927212" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children/> <Children/>
@@ -445,7 +446,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName1>Idle</AnimationName1> <AnimationName1>Idle</AnimationName1>
<Time1>0.22069183859343156</Time1> <Time1>1.8847063959212136</Time1>
<Speed1>1</Speed1> <Speed1>1</Speed1>
<AnimationName2></AnimationName2> <AnimationName2></AnimationName2>
<AnimationName3></AnimationName3> <AnimationName3></AnimationName3>
@@ -64,6 +64,9 @@ void CapturePointArrowHUDSystem::Update(double dt)
} }
} }
//Check what team is the owner of Home1 and set their target to the next capturepoint //Check what team is the owner of Home1 and set their target to the next capturepoint
if(!home1.Valid() || !home2.Valid()) {
return;
}
if((int)home1["CapturePoint"]["HomePointForTeam"] == redTeam) { if((int)home1["CapturePoint"]["HomePointForTeam"] == redTeam) {
m_RedTeamCurrentTarget = target1; m_RedTeamCurrentTarget = target1;
} else if ((int)home1["CapturePoint"]["HomePointForTeam"] == blueTeam) { } else if ((int)home1["CapturePoint"]["HomePointForTeam"] == blueTeam) {
@@ -77,10 +80,7 @@ void CapturePointArrowHUDSystem::Update(double dt)
m_BlueTeamCurrentTarget = target2; m_BlueTeamCurrentTarget = target2;
} }
} }
} }
//if red team, get red team next point, otherwise blue team next point. //if red team, get red team next point, otherwise blue team next point.
//Untill this is awailable we will just use the hardcoded value in the component. //Untill this is awailable we will just use the hardcoded value in the component.
//This will also give us a position, so we wont need to loop through all capturePoints. //This will also give us a position, so we wont need to loop through all capturePoints.
@@ -132,4 +132,6 @@ bool CapturePointArrowHUDSystem::OnCapturePointCaptured(Events::Captured& e)
} else if (e.TeamNumberThatCapturedCapturePoint == blueTeam) { } else if (e.TeamNumberThatCapturedCapturePoint == blueTeam) {
m_BlueTeamCurrentTarget = Transform::AbsolutePosition(e.NextCapturePoint);; m_BlueTeamCurrentTarget = Transform::AbsolutePosition(e.NextCapturePoint);;
} }
m_InitialtargetsSet = true;
} }