Clean up
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
#include "Rendering/Skeleton.h"
|
||||
#include "Rendering/BlendTree.h"
|
||||
#include "Rendering/EAutoAnimationBlend.h"
|
||||
#include "../Input/EInputCommand.h"
|
||||
#include "../Core/EntityWrapper.h"
|
||||
#include "Rendering/AutoBlendQueue.h"
|
||||
|
||||
@@ -30,10 +29,6 @@ private:
|
||||
EventRelay<AnimationSystem, Events::AutoAnimationBlend> m_EAutoAnimationBlend;
|
||||
bool OnAutoAnimationBlend(Events::AutoAnimationBlend& e);
|
||||
|
||||
|
||||
EventRelay<AnimationSystem, Events::InputCommand> m_EInputCommand;
|
||||
bool OnInputCommand(const Events::InputCommand& e);
|
||||
|
||||
std::unordered_map<EntityWrapper, AutoBlendQueue> m_AutoBlendQueues;
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,513 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<Entity name="Assault" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||
|
||||
<Components>
|
||||
<c:BlendAdditive>
|
||||
<Adder>AimBlend</Adder>
|
||||
<Receiver>FinalBlend</Receiver>
|
||||
</c:BlendAdditive>
|
||||
<c:Model>
|
||||
<GlowIntensity>5</GlowIntensity>
|
||||
<Resource>Models/Characters/Assault/AssaultBlue.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
|
||||
<Children>
|
||||
<Entity name="WeaponAttachment">
|
||||
<Components>
|
||||
<c:BoneAttachment>
|
||||
<BoneName>R_Arm_Weapon_Joint</BoneName>
|
||||
</c:BoneAttachment>
|
||||
<c:Model>
|
||||
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="0.156333789" Y="1.03861308" Z="-0.236426264"/>
|
||||
<Orientation X="-0.004295466" Y="-0.0313791931" Z="0.138012439"/>
|
||||
<Scale X="1.00000012" Y="1" Z="1.00000012"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="AimBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>AimPrimary</Pose1>
|
||||
<Pose2>AimSecondary</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="AimSecondary">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>AimSecWepA</AnimationName>
|
||||
<Time>0.5</Time>
|
||||
<Loop>false</Loop>
|
||||
<Additive>true</Additive>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="AimPrimary">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>AimRifleA</AnimationName>
|
||||
<Time>0.5</Time>
|
||||
<Loop>false</Loop>
|
||||
<Additive>true</Additive>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="FinalBlend">
|
||||
<Components>
|
||||
<c:BlendOverride>
|
||||
<Master>ReloadSwitchBlend</Master>
|
||||
<Slave>MovementBlend</Slave>
|
||||
</c:BlendOverride>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="MovementBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>StandCrouchBlend</Pose1>
|
||||
<Pose2>JumpDashBlend</Pose2>
|
||||
<Weight>2.5146881298480398e-63</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="StandCrouchBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>StandMovement</Pose1>
|
||||
<Pose2>CrouchMovement</Pose2>
|
||||
<Weight>0.012867419418159054</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="StandMovement">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>MovementBlend</Pose1>
|
||||
<Pose2>Idle</Pose2>
|
||||
<Weight>1</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="MovementBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>RunWalkBlend</Pose1>
|
||||
<Pose2>StrafeLRBlend</Pose2>
|
||||
<Weight>2.4565650245976452e-16</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="RunWalkBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Walk</Pose1>
|
||||
<Pose2>Run</Pose2>
|
||||
<Weight>1.2938206818383024e-24</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Walk">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>WalkF</AnimationName>
|
||||
<Time>0.2564968854355536</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Run">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>RunF</AnimationName>
|
||||
<Time>0.52851038945945739</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="StrafeLRBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Left</Pose1>
|
||||
<Pose2>Right</Pose2>
|
||||
<Weight>0.033793529385008014</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Left">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>StrafeLeftF</AnimationName>
|
||||
<Time>0.43808950646909217</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Right">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>StrafeRightF</AnimationName>
|
||||
<Time>0.4616050363492068</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="Idle">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>IdleF</AnimationName>
|
||||
<Time>0.0053995709937186831</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="CrouchMovement">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>MovementBlend</Pose1>
|
||||
<Pose2>Idle</Pose2>
|
||||
<Weight>0</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="MovementBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Walk</Pose1>
|
||||
<Pose2>StrafeLRBlend</Pose2>
|
||||
<Weight>2.4565650245976452e-16</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="StrafeLRBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Left</Pose1>
|
||||
<Pose2>Right</Pose2>
|
||||
<Weight>0.033793529385008014</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Left">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>CrouchStrafeLeftF</AnimationName>
|
||||
<Time>0.045646808897594759</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Right">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>CrouchStrafeRightF</AnimationName>
|
||||
<Time>0.97296827084837822</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="Walk">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>CrouchWalkF</AnimationName>
|
||||
<Time>0.75134225602578031</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="Idle">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>CrouchF</AnimationName>
|
||||
<Time>0.99862473341677438</Time>
|
||||
<Speed>1</Speed>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="JumpDashBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>Jump</Pose1>
|
||||
<Pose2>DashBlend</Pose2>
|
||||
<Weight>1</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="Jump">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>JumpF</AnimationName>
|
||||
<Time>0.5</Time>
|
||||
<Speed>1</Speed>
|
||||
<Loop>false</Loop>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="DashBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>DashFBBlend</Pose1>
|
||||
<Pose2>DashLRBlend</Pose2>
|
||||
<Weight>0.014621149736541383</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="DashFBBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>DashForward</Pose1>
|
||||
<Pose2>DashBackward</Pose2>
|
||||
<Weight>0.014363533804961248</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="DashForward">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>DashForwardF</AnimationName>
|
||||
<Time>1</Time>
|
||||
<Speed>1</Speed>
|
||||
<Loop>false</Loop>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="DashBackward">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>DashBackwardF</AnimationName>
|
||||
<Time>1</Time>
|
||||
<Speed>1</Speed>
|
||||
<Loop>false</Loop>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="DashLRBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>DashLeft</Pose1>
|
||||
<Pose2>DashRight</Pose2>
|
||||
<Weight>4.3244885367500671e-16</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="DashLeft">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>DashLeftF</AnimationName>
|
||||
<Time>1</Time>
|
||||
<Speed>1</Speed>
|
||||
<Loop>false</Loop>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="DashRight">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>DashRightF</AnimationName>
|
||||
<Time>1</Time>
|
||||
<Speed>1</Speed>
|
||||
<Loop>false</Loop>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="ReloadSwitchBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>ReloadSwitch</Pose1>
|
||||
<Pose2>WeaponActionBlend</Pose2>
|
||||
<Weight>1</Weight>
|
||||
<SubTreeRoot>true</SubTreeRoot>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="ReloadSwitch">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>ReloadSwitchU</AnimationName>
|
||||
<Time>0.00030848838797092881</Time>
|
||||
<Speed>1</Speed>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="WeaponActionBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>IdleBlend</Pose1>
|
||||
<Pose2>ShootBlend</Pose2>
|
||||
<Weight>0</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="IdleBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>IdlePrimary</Pose1>
|
||||
<Pose2>IdleSecondary</Pose2>
|
||||
<Weight>0</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="IdlePrimary">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>IdleAssaultRifleU</AnimationName>
|
||||
<Time>0.68071957047806109</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="IdleSecondary">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>IdleSecWepU</AnimationName>
|
||||
<Time>0.68424461076784837</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity name="ShootBlend">
|
||||
<Components>
|
||||
<c:Blend>
|
||||
<Pose1>ShootPrimary</Pose1>
|
||||
<Pose2>ShootSecondary</Pose2>
|
||||
<Weight>0</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="ShootPrimary">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>ShootFastRifleU</AnimationName>
|
||||
<Time>0.12914212153428517</Time>
|
||||
<Speed>1</Speed>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="ShootSecondary">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>ShootSecWepFastU</AnimationName>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
</Children>
|
||||
|
||||
</Entity>
|
||||
@@ -68,8 +68,8 @@
|
||||
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="0.11860811" Y="1.0820415" Z="-0.239292726"/>
|
||||
<Orientation X="-0.0479474887" Y="0.0671224222" Z="0.17587325"/>
|
||||
<Position X="0.157041892" Y="1.0375092" Z="-0.236085728"/>
|
||||
<Orientation X="-0.00432149554" Y="-0.0343661793" Z="0.138000518"/>
|
||||
<Scale X="1.00000012" Y="1" Z="1.00000012"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
@@ -86,11 +86,11 @@
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity name="AimPrimary">
|
||||
<Entity name="AimSecondary">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>AimRifleA</AnimationName>
|
||||
<Time>0.49999979138374329</Time>
|
||||
<AnimationName>AimSecWepA</AnimationName>
|
||||
<Time>0.5</Time>
|
||||
<Loop>false</Loop>
|
||||
<Additive>true</Additive>
|
||||
</c:Animation>
|
||||
@@ -98,10 +98,10 @@
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="AimSecondary">
|
||||
<Entity name="AimPrimary">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>AimSecWepA</AnimationName>
|
||||
<AnimationName>AimRifleA</AnimationName>
|
||||
<Time>0.5</Time>
|
||||
<Loop>false</Loop>
|
||||
<Additive>true</Additive>
|
||||
@@ -148,7 +148,7 @@
|
||||
<c:Blend>
|
||||
<Pose1>MovementBlend</Pose1>
|
||||
<Pose2>Idle</Pose2>
|
||||
<Weight>0</Weight>
|
||||
<Weight>1</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
@@ -177,7 +177,7 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>WalkF</AnimationName>
|
||||
<Time>0.62248157279189154</Time>
|
||||
<Time>0.28642783708275554</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
@@ -189,7 +189,7 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>RunF</AnimationName>
|
||||
<Time>0.89449507681579532</Time>
|
||||
<Time>0.55844134110665933</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
@@ -213,7 +213,7 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>StrafeLeftF</AnimationName>
|
||||
<Time>0.80407419382543011</Time>
|
||||
<Time>0.46802045811629411</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
@@ -225,7 +225,7 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>StrafeRightF</AnimationName>
|
||||
<Time>0.82758972370554473</Time>
|
||||
<Time>0.49153598799640874</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
@@ -241,8 +241,9 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>IdleF</AnimationName>
|
||||
<Time>0.8319563183471943</Time>
|
||||
<Time>1.9353306180083529</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
@@ -284,7 +285,7 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>CrouchStrafeLeftF</AnimationName>
|
||||
<Time>0.41163149625393314</Time>
|
||||
<Time>0.075577760544797146</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
@@ -296,7 +297,7 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>CrouchStrafeRightF</AnimationName>
|
||||
<Time>0.33895295820471616</Time>
|
||||
<Time>0.0028992224955801671</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
@@ -310,7 +311,7 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>CrouchWalkF</AnimationName>
|
||||
<Time>0.11732694338211824</Time>
|
||||
<Time>0.78127320767298225</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
@@ -473,7 +474,7 @@
|
||||
<c:Blend>
|
||||
<Pose1>IdleBlend</Pose1>
|
||||
<Pose2>ShootBlend</Pose2>
|
||||
<Weight>1</Weight>
|
||||
<Weight>0</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
@@ -483,6 +484,7 @@
|
||||
<c:Blend>
|
||||
<Pose1>IdlePrimary</Pose1>
|
||||
<Pose2>IdleSecondary</Pose2>
|
||||
<Weight>0</Weight>
|
||||
</c:Blend>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
@@ -491,6 +493,9 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>IdleAssaultRifleU</AnimationName>
|
||||
<Time>0.71065052212526325</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
@@ -500,6 +505,9 @@
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<AnimationName>IdleSecWepU</AnimationName>
|
||||
<Time>0.71417556241505054</Time>
|
||||
<Speed>1</Speed>
|
||||
<Play>true</Play>
|
||||
</c:Animation>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
|
||||
@@ -4,7 +4,6 @@ AnimationSystem::AnimationSystem(SystemParams params)
|
||||
: System(params)
|
||||
{
|
||||
EVENT_SUBSCRIBE_MEMBER(m_EAutoAnimationBlend, &AnimationSystem::OnAutoAnimationBlend);
|
||||
EVENT_SUBSCRIBE_MEMBER(m_EInputCommand, &AnimationSystem::OnInputCommand);
|
||||
}
|
||||
|
||||
void AnimationSystem::Update(double dt)
|
||||
@@ -16,7 +15,6 @@ void AnimationSystem::Update(double dt)
|
||||
|
||||
for(auto& autoBlendQueue : m_AutoBlendQueues) {
|
||||
autoBlendQueue.second.UpdateTime(dt);
|
||||
// autoBlendQueue.second.PrintQueue();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +134,6 @@ void AnimationSystem::UpdateWeights(double dt)
|
||||
|
||||
if (blendTree != nullptr) {
|
||||
blendJob.BlendInfo.progress = glm::clamp(blendJob.CurrentTime / blendJob.Duration, 0.0, 1.0);
|
||||
LOG_INFO("Progress: %f, %s", blendJob.BlendInfo.progress, blendJob.BlendInfo.NodeName.c_str());
|
||||
blendJob.BlendInfo = blendTree->AutoBlendStep(blendJob.BlendInfo);
|
||||
}
|
||||
|
||||
@@ -215,376 +212,6 @@ bool AnimationSystem::OnAutoAnimationBlend(Events::AutoAnimationBlend& e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
LOG_INFO("Inserting %s blendJob into %s subtree", e.NodeName.c_str(), subTreeRoot.Name().c_str());
|
||||
m_AutoBlendQueues[subTreeRoot].Insert(abj);
|
||||
|
||||
LOG_INFO("\n");
|
||||
m_AutoBlendQueues.at(subTreeRoot).PrintQueue();
|
||||
LOG_INFO("\n");
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AnimationSystem::OnInputCommand(const Events::InputCommand& e)
|
||||
{
|
||||
|
||||
if (e.Value == 1.f) {
|
||||
if(e.Command == "DashForward") {
|
||||
auto blendComponents = m_World->GetComponents("BlendAdditive");
|
||||
|
||||
if (blendComponents == nullptr) {
|
||||
return false;
|
||||
}
|
||||
for (auto& bc : *blendComponents) {
|
||||
EntityWrapper entity = EntityWrapper(m_World, bc.EntityID);
|
||||
|
||||
if (entity.Name() == "Assault") {
|
||||
{
|
||||
Events::AutoAnimationBlend aeb;
|
||||
aeb.Duration = 0.2;
|
||||
aeb.NodeName = "DashForward";
|
||||
aeb.RootNode = entity;
|
||||
aeb.Restart = true;
|
||||
aeb.Start = true;
|
||||
m_EventBroker->Publish(aeb);
|
||||
}
|
||||
{
|
||||
Events::AutoAnimationBlend aeb;
|
||||
aeb.Duration = 0.3;
|
||||
aeb.NodeName = "StandCrouchBlend";
|
||||
aeb.RootNode = entity;
|
||||
aeb.Delay = -0.3;
|
||||
aeb.Start = true;
|
||||
aeb.Restart = false;
|
||||
aeb.AnimationEntity = entity.FirstChildByName("DashForward");
|
||||
m_EventBroker->Publish(aeb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else if (e.Command == "DashBackward") {
|
||||
auto blendComponents = m_World->GetComponents("BlendAdditive");
|
||||
|
||||
if (blendComponents == nullptr) {
|
||||
return false;
|
||||
}
|
||||
for (auto& bc : *blendComponents) {
|
||||
EntityWrapper entity = EntityWrapper(m_World, bc.EntityID);
|
||||
|
||||
if (entity.Name() == "Assault") {
|
||||
{
|
||||
Events::AutoAnimationBlend aeb;
|
||||
aeb.Duration = 0.1;
|
||||
aeb.NodeName = "DashBackward";
|
||||
aeb.RootNode = entity;
|
||||
aeb.Restart = true;
|
||||
aeb.Start = true;
|
||||
m_EventBroker->Publish(aeb);
|
||||
}
|
||||
{
|
||||
Events::AutoAnimationBlend aeb;
|
||||
aeb.Duration = 0.3;
|
||||
aeb.NodeName = "StandCrouchBlend";
|
||||
aeb.RootNode = entity;
|
||||
aeb.Start = true;
|
||||
aeb.Restart = false;
|
||||
aeb.Delay = -0.3;
|
||||
aeb.AnimationEntity = entity.FirstChildByName("DashBackward");
|
||||
m_EventBroker->Publish(aeb);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (e.Command == "DashLeft") {
|
||||
auto blendComponents = m_World->GetComponents("BlendAdditive");
|
||||
|
||||
if (blendComponents == nullptr) {
|
||||
return false;
|
||||
}
|
||||
for (auto& bc : *blendComponents) {
|
||||
EntityWrapper entity = EntityWrapper(m_World, bc.EntityID);
|
||||
|
||||
if (entity.Name() == "Assault") {
|
||||
{
|
||||
Events::AutoAnimationBlend aeb;
|
||||
aeb.Duration = 0.1;
|
||||
aeb.NodeName = "DashLeft";
|
||||
aeb.RootNode = entity;
|
||||
aeb.Restart = true;
|
||||
aeb.Start = true;
|
||||
m_EventBroker->Publish(aeb);
|
||||
}
|
||||
{
|
||||
Events::AutoAnimationBlend aeb;
|
||||
aeb.Duration = 0.3;
|
||||
aeb.NodeName = "StandCrouchBlend";
|
||||
aeb.RootNode = entity;
|
||||
aeb.Delay = -0.3;
|
||||
aeb.Start = true;
|
||||
aeb.Restart = false;
|
||||
aeb.AnimationEntity = entity.FirstChildByName("DashLeft");
|
||||
m_EventBroker->Publish(aeb);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (e.Command == "DashRight") {
|
||||
auto blendComponents = m_World->GetComponents("BlendAdditive");
|
||||
|
||||
if (blendComponents == nullptr) {
|
||||
return false;
|
||||
}
|
||||
for (auto& bc : *blendComponents) {
|
||||
EntityWrapper entity = EntityWrapper(m_World, bc.EntityID);
|
||||
|
||||
if (entity.Name() == "Assault") {
|
||||
{
|
||||
Events::AutoAnimationBlend aeb;
|
||||
aeb.Duration = 0.1;
|
||||
aeb.NodeName = "DashRight";
|
||||
aeb.RootNode = entity;
|
||||
aeb.Restart = true;
|
||||
aeb.Start = true;
|
||||
m_EventBroker->Publish(aeb);
|
||||
}
|
||||
{
|
||||
Events::AutoAnimationBlend aeb;
|
||||
aeb.Duration = 0.3;
|
||||
aeb.NodeName = "StandCrouchBlend";
|
||||
aeb.RootNode = entity;
|
||||
aeb.Start = true;
|
||||
aeb.Restart = false;
|
||||
aeb.AnimationEntity = entity.FirstChildByName("DashRight");
|
||||
aeb.Delay = -0.3;
|
||||
m_EventBroker->Publish(aeb);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (e.Command == "Jump") {
|
||||
auto blendComponents = m_World->GetComponents("BlendAdditive");
|
||||
|
||||
if (blendComponents == nullptr) {
|
||||
return false;
|
||||
}
|
||||
for (auto& bc : *blendComponents) {
|
||||
EntityWrapper entity = EntityWrapper(m_World, bc.EntityID);
|
||||
|
||||
if (entity.Name() == "Assault") {
|
||||
{
|
||||
Events::AutoAnimationBlend aeb;
|
||||
aeb.Duration = 0.25;
|
||||
aeb.NodeName = "Jump";
|
||||
aeb.RootNode = entity;
|
||||
aeb.Start = true;
|
||||
aeb.Restart = true;
|
||||
m_EventBroker->Publish(aeb);
|
||||
}
|
||||
{
|
||||
Events::AutoAnimationBlend aeb;
|
||||
aeb.Duration = 0.3;
|
||||
aeb.NodeName = "StandCrouchBlend";
|
||||
aeb.RootNode = entity;
|
||||
aeb.Start = true;
|
||||
aeb.Restart = false;
|
||||
aeb.AnimationEntity = entity.FirstChildByName("Jump");
|
||||
m_EventBroker->Publish(aeb);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (e.Command == "Reload") {
|
||||
auto blendComponents = m_World->GetComponents("BlendAdditive");
|
||||
|
||||
if (blendComponents == nullptr) {
|
||||
return false;
|
||||
}
|
||||
for (auto& bc : *blendComponents) {
|
||||
EntityWrapper entity = EntityWrapper(m_World, bc.EntityID);
|
||||
|
||||
if (entity.Name() == "Assault") {
|
||||
{
|
||||
Events::AutoAnimationBlend aeb;
|
||||
aeb.Duration = 0.2;
|
||||
aeb.NodeName = "ReloadSwitch";
|
||||
aeb.RootNode = entity;
|
||||
aeb.Start = true;
|
||||
aeb.Restart = true;
|
||||
m_EventBroker->Publish(aeb);
|
||||
}
|
||||
{
|
||||
Events::AutoAnimationBlend aeb;
|
||||
aeb.Duration = 0.2;
|
||||
aeb.NodeName = "IdlePrimary";
|
||||
aeb.RootNode = entity;
|
||||
aeb.Delay = -0.1;
|
||||
aeb.Start = true;
|
||||
aeb.Restart = false;
|
||||
aeb.AnimationEntity = entity.FirstChildByName("ReloadSwitch");
|
||||
m_EventBroker->Publish(aeb);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (e.Command == "Crouch") {
|
||||
auto blendComponents = m_World->GetComponents("BlendAdditive");
|
||||
|
||||
if (blendComponents == nullptr) {
|
||||
return false;
|
||||
}
|
||||
for (auto& bc : *blendComponents) {
|
||||
EntityWrapper entity = EntityWrapper(m_World, bc.EntityID);
|
||||
|
||||
if (entity.Name() == "Assault") {
|
||||
{
|
||||
Events::AutoAnimationBlend aeb;
|
||||
aeb.Duration = 0.3;
|
||||
aeb.NodeName = "CrouchMovement";
|
||||
aeb.RootNode = entity;
|
||||
aeb.Start = true;
|
||||
aeb.Restart = true;
|
||||
aeb.SingleLevelBlend = true;
|
||||
m_EventBroker->Publish(aeb);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (e.Command == "Shoot") {
|
||||
auto blendComponents = m_World->GetComponents("BlendAdditive");
|
||||
|
||||
if (blendComponents == nullptr) {
|
||||
return false;
|
||||
}
|
||||
for (auto& bc : *blendComponents) {
|
||||
EntityWrapper entity = EntityWrapper(m_World, bc.EntityID);
|
||||
|
||||
if (entity.Name() == "Assault") {
|
||||
{
|
||||
Events::AutoAnimationBlend aeb;
|
||||
aeb.Duration = 0.1;
|
||||
aeb.NodeName = "ShootPrimary";
|
||||
aeb.RootNode = entity;
|
||||
aeb.Start = true;
|
||||
aeb.Restart = true;
|
||||
m_EventBroker->Publish(aeb);
|
||||
}
|
||||
{
|
||||
Events::AutoAnimationBlend aeb;
|
||||
aeb.Duration = 0.1;
|
||||
aeb.NodeName = "IdlePrimary";
|
||||
aeb.RootNode = entity;
|
||||
aeb.Delay = 0.0;
|
||||
aeb.Start = true;
|
||||
aeb.Restart = false;
|
||||
aeb.AnimationEntity = entity.FirstChildByName("ShootPrimary");
|
||||
m_EventBroker->Publish(aeb);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (e.Command == "LeftTest") {
|
||||
auto blendComponents = m_World->GetComponents("BlendAdditive");
|
||||
|
||||
if (blendComponents == nullptr) {
|
||||
return false;
|
||||
}
|
||||
for (auto& bc : *blendComponents) {
|
||||
EntityWrapper entity = EntityWrapper(m_World, bc.EntityID);
|
||||
|
||||
if (entity.Name() == "Assault") {
|
||||
{
|
||||
Events::AutoAnimationBlend aeb;
|
||||
aeb.Duration = 0.1;
|
||||
aeb.NodeName = "Left";
|
||||
aeb.RootNode = entity;
|
||||
aeb.Start = true;
|
||||
m_EventBroker->Publish(aeb);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (e.Command == "RightTest") {
|
||||
auto blendComponents = m_World->GetComponents("BlendAdditive");
|
||||
|
||||
if (blendComponents == nullptr) {
|
||||
return false;
|
||||
}
|
||||
for (auto& bc : *blendComponents) {
|
||||
EntityWrapper entity = EntityWrapper(m_World, bc.EntityID);
|
||||
|
||||
if (entity.Name() == "Assault") {
|
||||
{
|
||||
Events::AutoAnimationBlend aeb;
|
||||
aeb.Duration = 0.1;
|
||||
aeb.NodeName = "Right";
|
||||
aeb.RootNode = entity;
|
||||
aeb.Start = true;
|
||||
m_EventBroker->Publish(aeb);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} else if (e.Command == "ForwardTest") {
|
||||
auto blendComponents = m_World->GetComponents("BlendAdditive");
|
||||
|
||||
if (blendComponents == nullptr) {
|
||||
return false;
|
||||
}
|
||||
for (auto& bc : *blendComponents) {
|
||||
EntityWrapper entity = EntityWrapper(m_World, bc.EntityID);
|
||||
|
||||
if (entity.Name() == "Assault") {
|
||||
{
|
||||
Events::AutoAnimationBlend aeb;
|
||||
aeb.Duration = 0.1;
|
||||
aeb.NodeName = "Walk";
|
||||
aeb.RootNode = entity;
|
||||
aeb.Start = true;
|
||||
m_EventBroker->Publish(aeb);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (e.Command == "BackwardTest") {
|
||||
auto blendComponents = m_World->GetComponents("BlendAdditive");
|
||||
|
||||
if (blendComponents == nullptr) {
|
||||
return false;
|
||||
}
|
||||
for (auto& bc : *blendComponents) {
|
||||
EntityWrapper entity = EntityWrapper(m_World, bc.EntityID);
|
||||
|
||||
if (entity.Name() == "Assault") {
|
||||
{
|
||||
Events::AutoAnimationBlend aeb;
|
||||
aeb.Duration = 0.1;
|
||||
aeb.NodeName = "Walk";
|
||||
aeb.RootNode = entity;
|
||||
aeb.Start = true;
|
||||
aeb.Reverse = true;
|
||||
m_EventBroker->Publish(aeb);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (e.Value == 0.f) {
|
||||
if (e.Command == "Crouch") {
|
||||
auto blendComponents = m_World->GetComponents("BlendAdditive");
|
||||
|
||||
if (blendComponents == nullptr) {
|
||||
return false;
|
||||
}
|
||||
for (auto& bc : *blendComponents) {
|
||||
EntityWrapper entity = EntityWrapper(m_World, bc.EntityID);
|
||||
|
||||
if (entity.Name() == "Assault") {
|
||||
{
|
||||
Events::AutoAnimationBlend aeb;
|
||||
aeb.Duration = 0.3;
|
||||
aeb.NodeName = "StandMovement";
|
||||
aeb.RootNode = entity;
|
||||
aeb.Start = true;
|
||||
aeb.Restart = true;
|
||||
aeb.SingleLevelBlend = true;
|
||||
m_EventBroker->Publish(aeb);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,6 @@ void AutoBlendQueue::Insert(AutoBlendJob autoBlendJob)
|
||||
AnimationDuration = (animation->Duration * animationSpeed) - animationTime;
|
||||
}
|
||||
|
||||
LOG_INFO("Animation Duration %f", AnimationDuration);
|
||||
blendNode.StartTime += AnimationDuration;
|
||||
blendNode.EndTime += AnimationDuration;
|
||||
if (m_BlendQueue.size() == 0) {
|
||||
@@ -61,16 +60,13 @@ void AutoBlendQueue::Insert(AutoBlendJob autoBlendJob)
|
||||
|
||||
if (next != m_BlendQueue.end()) {
|
||||
if (it->StartTime >= blendNode.StartTime && next->StartTime <= blendNode.StartTime) {
|
||||
LOG_INFO("Inserted %s between %s and %s", blendNode.BlendJob.BlendInfo.NodeName.c_str(), it->BlendJob.BlendInfo.NodeName.c_str(), next->BlendJob.BlendInfo.NodeName.c_str());
|
||||
m_BlendQueue.insert(next, blendNode);
|
||||
return;
|
||||
}
|
||||
} else if(it->StartTime > blendNode.StartTime){
|
||||
LOG_INFO("Inserted %s after %s", blendNode.BlendJob.BlendInfo.NodeName.c_str(), it->BlendJob.BlendInfo.NodeName.c_str());
|
||||
m_BlendQueue.push_front(blendNode);
|
||||
return;
|
||||
} else if (it->StartTime <= blendNode.StartTime) {
|
||||
LOG_INFO("Inserted %s after %s", blendNode.BlendJob.BlendInfo.NodeName.c_str(), it->BlendJob.BlendInfo.NodeName.c_str());
|
||||
m_BlendQueue.push_back(blendNode);
|
||||
return;
|
||||
}
|
||||
@@ -80,7 +76,6 @@ void AutoBlendQueue::Insert(AutoBlendJob autoBlendJob)
|
||||
}
|
||||
|
||||
|
||||
LOG_INFO("Cleared BlendQueue and inserted %s", blendNode.BlendJob.BlendInfo.NodeName.c_str());
|
||||
m_BlendQueue.clear();
|
||||
m_BlendQueue.push_back(blendNode);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user