Arrow should now track the CapturePoint specified in the Component.
This commit is contained in:
@@ -3,9 +3,12 @@
|
||||
|
||||
#include <GLFW/glfw3.h>
|
||||
#include <glm/common.hpp>
|
||||
#include <glm/gtx/vector_angle.hpp>
|
||||
|
||||
#include "Common.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/Transform.h"
|
||||
|
||||
|
||||
class CapturePointArrowHUDSystem : public ImpureSystem
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "Common.h"
|
||||
#include "Core/System.h"
|
||||
#include "Engine/Collision/ETrigger.h"
|
||||
#include "Collision/ETrigger.h"
|
||||
|
||||
class CapturePointHUDSystem : public ImpureSystem
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</c:AssaultWeapon>
|
||||
<c:Collidable/>
|
||||
<c:DefenderWeapon>
|
||||
<TimeSinceLastFire>1.6944730461160304</TimeSinceLastFire>
|
||||
<TimeSinceLastFire>326.69883589440087</TimeSinceLastFire>
|
||||
</c:DefenderWeapon>
|
||||
<c:DoubleJump/>
|
||||
<c:Health/>
|
||||
@@ -30,7 +30,7 @@
|
||||
</Team>
|
||||
</c:Team>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0.0288832653" Z="3.63052702"/>
|
||||
<Position X="-3.10689902" Y="0.755898118" Z="8.34500504"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
|
||||
@@ -193,7 +193,6 @@
|
||||
<CapturePointNumber>3</CapturePointNumber>
|
||||
</c:CapturePointHUD>
|
||||
<c:Fill>
|
||||
<Percentage>0.80222018197612788</Percentage>
|
||||
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
|
||||
</c:Fill>
|
||||
<c:Sprite>
|
||||
@@ -228,6 +227,7 @@
|
||||
<CapturePointNumber>4</CapturePointNumber>
|
||||
</c:CapturePointHUD>
|
||||
<c:Fill>
|
||||
<Percentage>1</Percentage>
|
||||
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
|
||||
</c:Fill>
|
||||
<c:Sprite>
|
||||
@@ -283,7 +283,7 @@
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||
<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:Transform>
|
||||
<Position X="-1.58304751" Y="0.919596612" Z="0"/>
|
||||
@@ -294,7 +294,8 @@
|
||||
<Components>
|
||||
<c:CapturePointHUD/>
|
||||
<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:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
||||
@@ -303,7 +304,7 @@
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||
<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>
|
||||
</Components>
|
||||
<Children/>
|
||||
@@ -372,7 +373,7 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName1>Idle</AnimationName1>
|
||||
<Time1>0.67172915251515519</Time1>
|
||||
<Time1>0.20909021680133577</Time1>
|
||||
<Speed1>1</Speed1>
|
||||
<AnimationName2></AnimationName2>
|
||||
<AnimationName3></AnimationName3>
|
||||
@@ -386,30 +387,44 @@
|
||||
<Children>
|
||||
<Entity name="PrimaryAttachment">
|
||||
<Components>
|
||||
<c:WeaponAttachment>
|
||||
<Weapon>DefenderWeapon</Weapon>
|
||||
</c:WeaponAttachment>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/DefenderWeaponViewRed.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform/>
|
||||
<c:WeaponAttachment>
|
||||
<Weapon>DefenderWeapon</Weapon>
|
||||
</c:WeaponAttachment>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="SecondaryAttachment">
|
||||
<Components>
|
||||
<c:WeaponAttachment>
|
||||
<Weapon>AssaultWeapon</Weapon>
|
||||
</c:WeaponAttachment>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/AssaultWeaponView.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform/>
|
||||
<c:WeaponAttachment>
|
||||
<Weapon>AssaultWeapon</Weapon>
|
||||
</c:WeaponAttachment>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="CapturePointTargetIndicator">
|
||||
<Components>
|
||||
<c:CapturePointArrowHUD/>
|
||||
<c:Model>
|
||||
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="-0.200000003" Y="0.150000006" Z="-0.5"/>
|
||||
<Scale X="0.300000012" Y="0.300000012" Z="0.300000012"/>
|
||||
<Orientation X="-1.63629317" Y="1.90765047" Z="-0.0229658931"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="ThirdPersonCamera">
|
||||
@@ -430,6 +445,7 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName1>Idle</AnimationName1>
|
||||
<Time1>0.22069183859343156</Time1>
|
||||
<Speed1>1</Speed1>
|
||||
<AnimationName2></AnimationName2>
|
||||
<AnimationName3></AnimationName3>
|
||||
@@ -449,31 +465,31 @@
|
||||
<Children>
|
||||
<Entity name="PrimaryAttachment">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/DefenderWeaponWorldRed.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform/>
|
||||
<c:WeaponAttachment>
|
||||
<Weapon>DefenderWeapon</Weapon>
|
||||
<Person>
|
||||
<ThirdPerson/>
|
||||
</Person>
|
||||
</c:WeaponAttachment>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/DefenderWeaponWorldRed.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="SecondaryAttachment">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/AssaultWeaponWorld.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform/>
|
||||
<c:WeaponAttachment>
|
||||
<Weapon>AssaultWeapon</Weapon>
|
||||
<Person>
|
||||
<ThirdPerson/>
|
||||
</Person>
|
||||
</c:WeaponAttachment>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/AssaultWeaponWorld.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
<Entity xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||
|
||||
<Components>
|
||||
<c:CapturePointGameMode>
|
||||
<RespawnTime>4.7473226580121377</RespawnTime>
|
||||
</c:CapturePointGameMode>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="-1" Z="0"/>
|
||||
</c:Transform>
|
||||
@@ -40,7 +43,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="8433.37305" Z="0"/>
|
||||
<Orientation X="0" Y="9038.11328" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -81,19 +84,19 @@
|
||||
</Entity>
|
||||
<Entity name="DirectionalLight">
|
||||
<Components>
|
||||
<c:RaptorCopter>
|
||||
<Speed>1</Speed>
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:DirectionalLight>
|
||||
<Intensity>0.80000001192092896</Intensity>
|
||||
</c:DirectionalLight>
|
||||
<c:Model>
|
||||
<Resource>Models/Widgets/Lights/DirectionalLightWidget.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:RaptorCopter>
|
||||
<Speed>1</Speed>
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Position X="2.1529963" Y="6.59221172" Z="0.169116676"/>
|
||||
<Orientation X="4.16300011" Y="18271.9141" Z="0"/>
|
||||
<Orientation X="4.16300011" Y="18876.6172" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
@@ -108,7 +111,11 @@
|
||||
<Children>
|
||||
<Entity name="RunAnim">
|
||||
<Components>
|
||||
<c:Animation/>
|
||||
<c:Animation>
|
||||
<AnimationName1></AnimationName1>
|
||||
<AnimationName2></AnimationName2>
|
||||
<AnimationName3></AnimationName3>
|
||||
</c:Animation>
|
||||
<c:Model>
|
||||
<Resource>Models/Characters/Assault/AssaultAnimated.mesh</Resource>
|
||||
</c:Model>
|
||||
@@ -120,7 +127,11 @@
|
||||
</Entity>
|
||||
<Entity name="Walkanim">
|
||||
<Components>
|
||||
<c:Animation/>
|
||||
<c:Animation>
|
||||
<AnimationName1></AnimationName1>
|
||||
<AnimationName2></AnimationName2>
|
||||
<AnimationName3></AnimationName3>
|
||||
</c:Animation>
|
||||
<c:Model>
|
||||
<Resource>Models/Characters/Assault/AssaultAnimated.mesh</Resource>
|
||||
</c:Model>
|
||||
@@ -168,13 +179,17 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="2553.63574" Z="0"/>
|
||||
<Orientation X="0" Y="2856.05518" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Asset">
|
||||
<Components>
|
||||
<c:Animation/>
|
||||
<c:Animation>
|
||||
<AnimationName1></AnimationName1>
|
||||
<AnimationName2></AnimationName2>
|
||||
<AnimationName3></AnimationName3>
|
||||
</c:Animation>
|
||||
<c:Model>
|
||||
<Resource>Models/Characters/Assault/AssaultAnimated.mesh</Resource>
|
||||
</c:Model>
|
||||
@@ -213,7 +228,7 @@
|
||||
<Axis X="1" Y="1" Z="1"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="16862.3945" Y="16862.3945" Z="16862.3945"/>
|
||||
<Orientation X="17467.0977" Y="17467.0977" Z="17467.0977"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -277,7 +292,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="16658.3906" Z="0"/>
|
||||
<Orientation X="0" Y="17263.0938" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -309,7 +324,7 @@
|
||||
<Axis X="0.699999988" Y="1" Z="0.300000012"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="12206.665" Y="17385.8008" Z="5202.3335"/>
|
||||
<Orientation X="12630.0664" Y="17990.5039" Z="5383.80176"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -659,7 +674,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="851.386902" Z="0"/>
|
||||
<Orientation X="0" Y="1153.80225" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -706,7 +721,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="851.386902" Z="0"/>
|
||||
<Orientation X="0" Y="1153.80225" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -766,7 +781,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="851.386902" Z="0"/>
|
||||
<Orientation X="0" Y="1153.80225" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -813,7 +828,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="851.386902" Z="0"/>
|
||||
<Orientation X="0" Y="1153.80225" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -859,7 +874,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="851.386902" Z="0"/>
|
||||
<Orientation X="0" Y="1153.80225" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -906,7 +921,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="851.386902" Z="0"/>
|
||||
<Orientation X="0" Y="1153.80225" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -953,7 +968,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="851.386902" Z="0"/>
|
||||
<Orientation X="0" Y="1153.80225" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -1013,6 +1028,7 @@
|
||||
</HomePointForTeam>
|
||||
<CaptureTimer>15</CaptureTimer>
|
||||
</c:CapturePoint>
|
||||
<c:Trigger/>
|
||||
<c:Model>
|
||||
<Resource>Models/Core/UnitCube.mesh</Resource>
|
||||
<Color A="0.300000012" B="0" G="0" R="1"/>
|
||||
@@ -1027,7 +1043,6 @@
|
||||
<Position X="0" Y="2" Z="0"/>
|
||||
<Scale X="8" Y="4" Z="8"/>
|
||||
</c:Transform>
|
||||
<c:Trigger/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
@@ -1063,6 +1078,7 @@
|
||||
<c:CapturePoint>
|
||||
<CapturePointNumber>1</CapturePointNumber>
|
||||
</c:CapturePoint>
|
||||
<c:Trigger/>
|
||||
<c:Model>
|
||||
<Resource>Models/Core/UnitCube.mesh</Resource>
|
||||
<Color A="0.300000012" B="1" G="1" R="1"/>
|
||||
@@ -1073,7 +1089,6 @@
|
||||
<Position X="0" Y="2" Z="0"/>
|
||||
<Scale X="8" Y="4" Z="8"/>
|
||||
</c:Transform>
|
||||
<c:Trigger/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
@@ -1107,6 +1122,7 @@
|
||||
<c:CapturePoint>
|
||||
<CapturePointNumber>2</CapturePointNumber>
|
||||
</c:CapturePoint>
|
||||
<c:Trigger/>
|
||||
<c:Model>
|
||||
<Resource>Models/Core/UnitCube.mesh</Resource>
|
||||
<Color A="0.300000012" B="1" G="1" R="1"/>
|
||||
@@ -1117,7 +1133,6 @@
|
||||
<Position X="0" Y="2" Z="0"/>
|
||||
<Scale X="8" Y="4" Z="8"/>
|
||||
</c:Transform>
|
||||
<c:Trigger/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
@@ -1153,6 +1168,7 @@
|
||||
<c:CapturePoint>
|
||||
<CapturePointNumber>3</CapturePointNumber>
|
||||
</c:CapturePoint>
|
||||
<c:Trigger/>
|
||||
<c:Model>
|
||||
<Resource>Models/Core/UnitCube.mesh</Resource>
|
||||
<Color A="0.300000012" B="1" G="1" R="1"/>
|
||||
@@ -1163,7 +1179,6 @@
|
||||
<Position X="0" Y="2" Z="0"/>
|
||||
<Scale X="8" Y="4" Z="8"/>
|
||||
</c:Transform>
|
||||
<c:Trigger/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
@@ -1203,6 +1218,7 @@
|
||||
<CaptureTimer>-15</CaptureTimer>
|
||||
<CapturePointNumber>4</CapturePointNumber>
|
||||
</c:CapturePoint>
|
||||
<c:Trigger/>
|
||||
<c:Model>
|
||||
<Resource>Models/Core/UnitCube.mesh</Resource>
|
||||
<Color A="0.300000012" B="1" G="0" R="0"/>
|
||||
@@ -1217,7 +1233,6 @@
|
||||
<Position X="0" Y="2" Z="0"/>
|
||||
<Scale X="8" Y="4" Z="8"/>
|
||||
</c:Transform>
|
||||
<c:Trigger/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
@@ -1367,7 +1382,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="1385.11243" Z="0"/>
|
||||
<Orientation X="0" Y="1687.52917" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -1376,7 +1391,7 @@
|
||||
<c:ExplosionEffect>
|
||||
<ColorByDistance>true</ColorByDistance>
|
||||
<Velocity X="0.800000012" Y="0.0379999988" Z="0"/>
|
||||
<TimeSinceDeath>0.8256214817261025</TimeSinceDeath>
|
||||
<TimeSinceDeath>2.5396116058983438</TimeSinceDeath>
|
||||
<ExplosionDuration>3.7999999523162842</ExplosionDuration>
|
||||
<EndColor A="0" B="23.5294113" G="11.7647057" R="0"/>
|
||||
<Randomness>true</Randomness>
|
||||
@@ -1423,7 +1438,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="1385.11243" Z="0"/>
|
||||
<Orientation X="0" Y="1687.52917" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -1432,7 +1447,7 @@
|
||||
<c:ExplosionEffect>
|
||||
<Velocity X="0.5" Y="1" Z="0"/>
|
||||
<ExplosionOrigin X="0" Y="0.900000036" Z="0"/>
|
||||
<TimeSinceDeath>1.8641349174045843</TimeSinceDeath>
|
||||
<TimeSinceDeath>1.5396208215609732</TimeSinceDeath>
|
||||
</c:ExplosionEffect>
|
||||
<c:Model>
|
||||
<Resource>Models/Characters/Assault/AssaultTPose.mesh</Resource>
|
||||
@@ -1475,18 +1490,22 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="1385.11243" Z="0"/>
|
||||
<Orientation X="0" Y="1687.52917" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Asset">
|
||||
<Components>
|
||||
<c:Animation/>
|
||||
<c:Animation>
|
||||
<AnimationName1></AnimationName1>
|
||||
<AnimationName2></AnimationName2>
|
||||
<AnimationName3></AnimationName3>
|
||||
</c:Animation>
|
||||
<c:ExplosionEffect>
|
||||
<ColorByDistance>true</ColorByDistance>
|
||||
<Velocity X="0.300000012" Y="2" Z="0"/>
|
||||
<ExplosionOrigin X="0" Y="1.30000007" Z="-0.200000003"/>
|
||||
<TimeSinceDeath>1.8641349174045843</TimeSinceDeath>
|
||||
<TimeSinceDeath>1.5396208215609732</TimeSinceDeath>
|
||||
<EndColor A="0" B="0.333333343" G="0.933333337" R="3.92156863"/>
|
||||
<Randomness>true</Randomness>
|
||||
</c:ExplosionEffect>
|
||||
@@ -1531,7 +1550,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="1392.89258" Z="0"/>
|
||||
<Orientation X="0" Y="1695.30933" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -1541,7 +1560,7 @@
|
||||
<ColorByDistance>true</ColorByDistance>
|
||||
<Velocity X="0" Y="0.699999988" Z="0"/>
|
||||
<ExplosionOrigin X="0" Y="-1.10000002" Z="0"/>
|
||||
<TimeSinceDeath>1.2301962937648341</TimeSinceDeath>
|
||||
<TimeSinceDeath>4.4522528839264339</TimeSinceDeath>
|
||||
<ExplosionDuration>10</ExplosionDuration>
|
||||
<EndColor A="1" B="0" G="0" R="1"/>
|
||||
<RandomnessScalar>3</RandomnessScalar>
|
||||
@@ -1589,7 +1608,7 @@
|
||||
<Axis X="0" Y="1" Z="0"/>
|
||||
</c:RaptorCopter>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="991.007263" Z="0"/>
|
||||
<Orientation X="0" Y="1293.42383" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -1599,7 +1618,7 @@
|
||||
<ColorByDistance>true</ColorByDistance>
|
||||
<Velocity X="6" Y="0.100000001" Z="0"/>
|
||||
<ExplosionOrigin X="0" Y="-10" Z="0"/>
|
||||
<TimeSinceDeath>3.4214855659573402</TimeSinceDeath>
|
||||
<TimeSinceDeath>3.2362842141074992</TimeSinceDeath>
|
||||
<ExponentialAccelaration>true</ExponentialAccelaration>
|
||||
<ExplosionDuration>5</ExplosionDuration>
|
||||
<Randomness>true</Randomness>
|
||||
@@ -1690,6 +1709,7 @@
|
||||
</c:Physics>
|
||||
<c:Player>
|
||||
<MovementSpeed>5</MovementSpeed>
|
||||
<CurrentWeapon></CurrentWeapon>
|
||||
</c:Player>
|
||||
<c:Team>
|
||||
<Team>
|
||||
@@ -1712,6 +1732,7 @@
|
||||
<Entity name="PlayerName">
|
||||
<Components>
|
||||
<c:Text>
|
||||
<Content></Content>
|
||||
<Resource>Fonts/DroidSans.ttf,100</Resource>
|
||||
<Color A="1" B="0" G="1" R="0"/>
|
||||
</c:Text>
|
||||
@@ -1780,7 +1801,7 @@
|
||||
<c:ExplosionEffect>
|
||||
<ColorByDistance>true</ColorByDistance>
|
||||
<Velocity X="0.800000012" Y="0.0379999988" Z="0"/>
|
||||
<TimeSinceDeath>0.8256214817261025</TimeSinceDeath>
|
||||
<TimeSinceDeath>2.5396116058983438</TimeSinceDeath>
|
||||
<ExplosionDuration>3.7999999523162842</ExplosionDuration>
|
||||
<EndColor A="0" B="23.5294113" G="11.7647057" R="0"/>
|
||||
<Randomness>true</Randomness>
|
||||
@@ -1823,7 +1844,11 @@
|
||||
</Entity>
|
||||
<Entity name="PlayerModel">
|
||||
<Components>
|
||||
<c:Animation/>
|
||||
<c:Animation>
|
||||
<AnimationName1></AnimationName1>
|
||||
<AnimationName2></AnimationName2>
|
||||
<AnimationName3></AnimationName3>
|
||||
</c:Animation>
|
||||
<c:Shielded/>
|
||||
<c:HiddenForLocalPlayer/>
|
||||
<c:Model>
|
||||
@@ -1925,6 +1950,7 @@
|
||||
<Components>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Props/FoliageDiff.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
</c:Sprite>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
@@ -1934,6 +1960,7 @@
|
||||
<Components>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Props/FoliageDiff.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="-0.177861199" Y="0" Z="-1.04673338"/>
|
||||
@@ -1954,6 +1981,7 @@
|
||||
<Components>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
<Color A="0.300000012" B="1" G="1" R="1"/>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
@@ -1971,6 +1999,7 @@
|
||||
</c:Fill>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||
@@ -1986,6 +2015,7 @@
|
||||
<Components>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
<Color A="0.300000012" B="1" G="1" R="1"/>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
@@ -2003,6 +2033,7 @@
|
||||
</c:Fill>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||
@@ -2018,6 +2049,7 @@
|
||||
<Components>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
@@ -2036,6 +2068,7 @@
|
||||
</c:Fill>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||
@@ -2051,6 +2084,7 @@
|
||||
<Components>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
<Color A="0.300000012" B="1" G="1" R="1"/>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
@@ -2068,6 +2102,7 @@
|
||||
</c:Fill>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||
@@ -2083,6 +2118,7 @@
|
||||
<Components>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
<Color A="0.699999988" B="0" G="0" R="1"/>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
@@ -2099,6 +2135,7 @@
|
||||
</c:Fill>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="0.00999999978"/>
|
||||
@@ -2167,6 +2204,7 @@
|
||||
<Components>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/ErrorTexture.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="-1"/>
|
||||
@@ -2178,6 +2216,7 @@
|
||||
<c:Button/>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0.388422519" Z="0.0627754927"/>
|
||||
@@ -2206,6 +2245,7 @@
|
||||
<c:Button/>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0.214031488" Z="0.0627754927"/>
|
||||
@@ -2234,6 +2274,7 @@
|
||||
<c:Button/>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0.0367300175" Z="0.0627754927"/>
|
||||
@@ -2262,6 +2303,7 @@
|
||||
<c:Button/>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="-0.148274168" Z="0.0627754927"/>
|
||||
@@ -2290,6 +2332,7 @@
|
||||
<c:Button/>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="-0.335298717" Z="0.0627754927"/>
|
||||
@@ -2331,6 +2374,7 @@
|
||||
<Components>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/ErrorTexture.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="-1"/>
|
||||
@@ -2342,6 +2386,7 @@
|
||||
<c:Button/>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0.375197947" Z="0.0627754927"/>
|
||||
@@ -2370,6 +2415,7 @@
|
||||
<c:Button/>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0.199327558" Z="0.0627754927"/>
|
||||
@@ -2398,6 +2444,7 @@
|
||||
<c:Button/>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0.0159880854" Z="0.0627754927"/>
|
||||
@@ -2426,6 +2473,7 @@
|
||||
<c:Button/>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/Core/White.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="-0.164955258" Z="0.0627754927"/>
|
||||
@@ -2482,6 +2530,36 @@
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity>
|
||||
<Components>
|
||||
<c:Team/>
|
||||
<c:Transform>
|
||||
<Position X="9.42733288" Y="8.22214794" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="CapturePointArrow">
|
||||
<Components>
|
||||
<c:CapturePointArrowHUD>
|
||||
<CurrentTarget>2</CurrentTarget>
|
||||
</c:CapturePointArrowHUD>
|
||||
<c:Model>
|
||||
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:Team>
|
||||
<Team>
|
||||
<Red/>
|
||||
</Team>
|
||||
</c:Team>
|
||||
<c:Transform>
|
||||
<Scale X="10.7000008" Y="1.4000001" Z="5.30000019"/>
|
||||
<Orientation X="-0.648448348" Y="-0.417814791" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
|
||||
</Entity>
|
||||
|
||||
@@ -9,5 +9,108 @@ CapturePointArrowHUDSystem::CapturePointArrowHUDSystem(SystemParams params)
|
||||
|
||||
void CapturePointArrowHUDSystem::Update(double dt)
|
||||
{
|
||||
//Logic here
|
||||
|
||||
bool LoadCheck = true;
|
||||
int redTeam;
|
||||
int blueTeam;
|
||||
int spectatorTeam;
|
||||
|
||||
//Get list for all CapturePointArrowHUDComponents
|
||||
auto ArrowHUDs = m_World->GetComponents("CapturePointArrowHUD");
|
||||
auto CapturePoints = m_World->GetComponents("CapturePoint");
|
||||
if(ArrowHUDs == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
for(auto& cArrowHUD : *ArrowHUDs) {
|
||||
//Get what team the current arrow corresponds to
|
||||
EntityWrapper ArrowEntity = EntityWrapper(m_World, cArrowHUD.EntityID);
|
||||
EntityWrapper teamEntity = ArrowEntity.FirstParentWithComponent("Team");
|
||||
if (!teamEntity.Valid()) {
|
||||
continue;
|
||||
}
|
||||
auto cTeam = teamEntity["Team"];
|
||||
int currentTeam = (int)cTeam["Team"];
|
||||
|
||||
if (LoadCheck) {
|
||||
redTeam = (int)cTeam["Team"].Enum("Red");
|
||||
blueTeam = (int)cTeam["Team"].Enum("Blue");
|
||||
spectatorTeam = (int)cTeam["Team"].Enum("Spectator");
|
||||
LoadCheck = false;
|
||||
}
|
||||
|
||||
//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.
|
||||
//This will also give us a position, so we wont need to loop through all capturePoints.
|
||||
glm::vec3 pos;
|
||||
int target = cArrowHUD["CurrentTarget"];
|
||||
for(auto& cCP : *CapturePoints) {
|
||||
if((int)cCP["CapturePointNumber"] == target) {
|
||||
EntityWrapper CPEntity = EntityWrapper(m_World, cCP.EntityID);
|
||||
pos = Transform::AbsolutePosition(CPEntity);
|
||||
break;
|
||||
}
|
||||
}
|
||||
glm::vec3& arrowOri = ArrowEntity["Transform"]["Orientation"];
|
||||
glm::vec3 lookVector = glm::normalize(Transform::AbsolutePosition(ArrowEntity) - pos); //Maybe should be player instead
|
||||
float pitch = std::asin(-lookVector.y);
|
||||
float yaw = std::atan2(lookVector.x, lookVector.z);
|
||||
arrowOri.x = pitch;
|
||||
arrowOri.y = yaw;
|
||||
arrowOri.z = 0.f;
|
||||
EntityWrapper parent = ArrowEntity.Parent();
|
||||
if (parent.Valid()) {
|
||||
arrowOri -= Transform::AbsoluteOrientationEuler(parent);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
bool LoadCheck = true;
|
||||
int redTeam;
|
||||
int blueTeam;
|
||||
int spectatorTeam;
|
||||
|
||||
auto CapturePointHUDElements = m_World->GetComponents("CapturePointHUD");
|
||||
auto CapturePoints = m_World->GetComponents("CapturePoint");
|
||||
if (CapturePointHUDElements == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!CapturePointHUDElements) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (auto& cCapturePointHUD : *CapturePointHUDElements) {
|
||||
int HUD_ID = cCapturePointHUD["CapturePointNumber"];
|
||||
EntityWrapper entityHUD = EntityWrapper(m_World, cCapturePointHUD.EntityID);
|
||||
EntityWrapper entityHUDparent = entityHUD.Parent();
|
||||
|
||||
for (auto& cCapturePoint : *CapturePoints) {
|
||||
EntityWrapper entityCP = EntityWrapper(m_World, cCapturePoint.EntityID);
|
||||
|
||||
//Check if the HUD corresponds to the Capture Point Number
|
||||
if (HUD_ID == (int)entityCP["CapturePoint"]["CapturePointNumber"]) {
|
||||
ComponentWrapper& teamComponent = entityCP["Team"];
|
||||
if (LoadCheck) {
|
||||
redTeam = (int)teamComponent["Team"].Enum("Red");
|
||||
blueTeam = (int)teamComponent["Team"].Enum("Blue");
|
||||
spectatorTeam = (int)teamComponent["Team"].Enum("Spectator");
|
||||
LoadCheck = false;
|
||||
}
|
||||
//Color hud with team color
|
||||
auto capturePointTeam = (int)teamComponent["Team"];
|
||||
entityHUDparent["Sprite"]["Color"] = capturePointTeam == blueTeam ? glm::vec4(0, 0.2f, 1, 0.7f) : capturePointTeam == redTeam ? glm::vec4(1, 0.0f, 0, 0.7f) : glm::vec4(1, 1, 1, 0.3f);
|
||||
|
||||
//Progress is scaled with time
|
||||
double currentCaptureTime = (double)entityCP["CapturePoint"]["CaptureTimer"];
|
||||
double progress = glm::abs(currentCaptureTime)/15.0;
|
||||
int currentCapturingTeam = currentCaptureTime > 0 ? redTeam : currentCaptureTime < 0 ? blueTeam : spectatorTeam;
|
||||
((glm::vec3&)entityHUD["Transform"]["Orientation"]).z = currentCapturingTeam == redTeam ? glm::half_pi<float>()+glm::pi<float>() : glm::half_pi<float>();
|
||||
glm::vec4 fillColor = currentCapturingTeam == redTeam ? glm::vec4(1, 0.f, 0, 0.7f) : glm::vec4(0, 0.2f, 1, 0.7f);
|
||||
entityHUD["Fill"]["Color"] = fillColor;
|
||||
entityHUD["Fill"]["Percentage"] = progress;
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
Reference in New Issue
Block a user