Dash now looking good
This commit is contained in:
@@ -110,7 +110,6 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
|
|||||||
if (e.Command == "Pitch") {
|
if (e.Command == "Pitch") {
|
||||||
float val = glm::radians(e.Value);
|
float val = glm::radians(e.Value);
|
||||||
m_Rotation.x += -val;
|
m_Rotation.x += -val;
|
||||||
//m_Rotation.x = glm::clamp(m_Rotation.x, -glm::half_pi<float>(), glm::half_pi<float>());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.Command == "Yaw") {
|
if (e.Command == "Yaw") {
|
||||||
@@ -123,14 +122,14 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
|
|||||||
float val = glm::clamp(e.Value, -1.f, 1.f);
|
float val = glm::clamp(e.Value, -1.f, 1.f);
|
||||||
m_Movement.z = -val;
|
m_Movement.z = -val;
|
||||||
|
|
||||||
|
//Animation
|
||||||
if (m_PlayerEntity.Valid()) {
|
if (m_PlayerEntity.Valid()) {
|
||||||
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
|
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
|
||||||
if (playerModel.Valid()) {
|
if (playerModel.Valid()) {
|
||||||
if (val > 0) {
|
if (val > 0) { // Walk/Run
|
||||||
Events::AutoAnimationBlend aeb;
|
Events::AutoAnimationBlend aeb;
|
||||||
aeb.Duration = 0.1;
|
aeb.Duration = 0.1;
|
||||||
|
if (m_Crouching) {
|
||||||
if(m_Crouching) {
|
|
||||||
aeb.NodeName = "Walk";
|
aeb.NodeName = "Walk";
|
||||||
} else {
|
} else {
|
||||||
aeb.NodeName = "Run";
|
aeb.NodeName = "Run";
|
||||||
@@ -139,7 +138,7 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
|
|||||||
aeb.Start = true;
|
aeb.Start = true;
|
||||||
aeb.SingleLevelBlend = true;
|
aeb.SingleLevelBlend = true;
|
||||||
m_EventBroker->Publish(aeb);
|
m_EventBroker->Publish(aeb);
|
||||||
} else if (val < 0) {
|
} else if (val < 0) { // Walk/run Backwards
|
||||||
Events::AutoAnimationBlend aeb;
|
Events::AutoAnimationBlend aeb;
|
||||||
aeb.Duration = 0.1;
|
aeb.Duration = 0.1;
|
||||||
if (m_Crouching) {
|
if (m_Crouching) {
|
||||||
@@ -152,8 +151,6 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
|
|||||||
aeb.SingleLevelBlend = true;
|
aeb.SingleLevelBlend = true;
|
||||||
aeb.Reverse = true;
|
aeb.Reverse = true;
|
||||||
m_EventBroker->Publish(aeb);
|
m_EventBroker->Publish(aeb);
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -162,10 +159,11 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
|
|||||||
float val = glm::clamp(e.Value, -1.f, 1.f);
|
float val = glm::clamp(e.Value, -1.f, 1.f);
|
||||||
m_Movement.x = val;
|
m_Movement.x = val;
|
||||||
|
|
||||||
|
|
||||||
|
//Animation
|
||||||
if (m_PlayerEntity.Valid()) {
|
if (m_PlayerEntity.Valid()) {
|
||||||
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
|
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
|
||||||
|
if (playerModel.Valid()) { //Right Strafe
|
||||||
if (playerModel.Valid()) {
|
|
||||||
if (val > 0) {
|
if (val > 0) {
|
||||||
Events::AutoAnimationBlend aeb;
|
Events::AutoAnimationBlend aeb;
|
||||||
aeb.Duration = 0.1;
|
aeb.Duration = 0.1;
|
||||||
@@ -174,7 +172,7 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
|
|||||||
aeb.SingleLevelBlend = true;
|
aeb.SingleLevelBlend = true;
|
||||||
aeb.Start = true;
|
aeb.Start = true;
|
||||||
m_EventBroker->Publish(aeb);
|
m_EventBroker->Publish(aeb);
|
||||||
} else if (val < 0) {
|
} else if (val < 0) { //LeftStrafe
|
||||||
Events::AutoAnimationBlend aeb;
|
Events::AutoAnimationBlend aeb;
|
||||||
aeb.Duration = 0.1;
|
aeb.Duration = 0.1;
|
||||||
aeb.NodeName = "Left";
|
aeb.NodeName = "Left";
|
||||||
@@ -182,63 +180,59 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
|
|||||||
aeb.SingleLevelBlend = true;
|
aeb.SingleLevelBlend = true;
|
||||||
aeb.Start = true;
|
aeb.Start = true;
|
||||||
m_EventBroker->Publish(aeb);
|
m_EventBroker->Publish(aeb);
|
||||||
} else {
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (glm::length2(m_Movement) < 0.1f) {
|
|
||||||
if (m_PlayerEntity.Valid()) {
|
|
||||||
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
|
|
||||||
|
|
||||||
if (playerModel.Valid()) {
|
|
||||||
Events::AutoAnimationBlend aeb;
|
|
||||||
aeb.Duration = 0.2;
|
|
||||||
aeb.NodeName = "Idle";
|
|
||||||
aeb.RootNode = playerModel;
|
|
||||||
m_EventBroker->Publish(aeb);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (m_PlayerEntity.Valid()) {
|
|
||||||
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
|
|
||||||
|
|
||||||
if (playerModel.Valid()) {
|
|
||||||
Events::AutoAnimationBlend aeb;
|
|
||||||
aeb.Duration = 0.2;
|
|
||||||
aeb.NodeName = "MovementBlend";
|
|
||||||
aeb.RootNode = playerModel;
|
|
||||||
m_EventBroker->Publish(aeb);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Animation
|
||||||
if (glm::length2(m_Movement) > 0) {
|
if (glm::length2(m_Movement) < 0.1f) {
|
||||||
m_Movement = glm::normalize(m_Movement);
|
//Blend to Idle
|
||||||
|
if (m_PlayerEntity.Valid()) {
|
||||||
if (m_PlayerEntity.Valid()) {
|
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
|
||||||
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
|
if (playerModel.Valid()) {
|
||||||
|
Events::AutoAnimationBlend aeb;
|
||||||
if (playerModel.Valid()) {
|
aeb.Duration = 0.2;
|
||||||
glm::vec2 direction = glm::normalize(glm::vec2(m_Movement.x, m_Movement.z));
|
aeb.NodeName = "Idle";
|
||||||
|
aeb.RootNode = playerModel;
|
||||||
double weight = glm::abs(glm::dot(glm::vec2(1, 0), direction));
|
m_EventBroker->Publish(aeb);
|
||||||
LOG_INFO("Weight %f", weight);
|
|
||||||
Events::SetBlendWeight sbw;
|
|
||||||
sbw.NodeName = "MovementBlend";
|
|
||||||
sbw.Weight = weight;
|
|
||||||
sbw.RootNode = playerModel;
|
|
||||||
m_EventBroker->Publish(sbw);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
//Blend to movement
|
||||||
|
if (m_PlayerEntity.Valid()) {
|
||||||
|
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
|
||||||
|
if (playerModel.Valid()) {
|
||||||
|
Events::AutoAnimationBlend aeb;
|
||||||
|
aeb.Duration = 0.2;
|
||||||
|
aeb.NodeName = "MovementBlend";
|
||||||
|
aeb.RootNode = playerModel;
|
||||||
|
m_EventBroker->Publish(aeb);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (glm::length2(m_Movement) > 0) {
|
||||||
|
m_Movement = glm::normalize(m_Movement);
|
||||||
|
|
||||||
|
//Animation
|
||||||
|
// movement direction blend
|
||||||
|
if (m_PlayerEntity.Valid()) {
|
||||||
|
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
|
||||||
|
if (playerModel.Valid()) {
|
||||||
|
glm::vec2 direction = glm::normalize(glm::vec2(m_Movement.x, m_Movement.z));
|
||||||
|
double weight = glm::abs(glm::dot(glm::vec2(1, 0), direction));
|
||||||
|
Events::SetBlendWeight sbw;
|
||||||
|
sbw.NodeName = "MovementBlend";
|
||||||
|
sbw.Weight = weight;
|
||||||
|
sbw.RootNode = playerModel;
|
||||||
|
m_EventBroker->Publish(sbw);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -274,6 +268,8 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
|
|||||||
if (e.Command == "Crouch") {
|
if (e.Command == "Crouch") {
|
||||||
m_Crouching = e.Value > 0;
|
m_Crouching = e.Value > 0;
|
||||||
|
|
||||||
|
|
||||||
|
//Animation
|
||||||
if (m_PlayerEntity.Valid()) {
|
if (m_PlayerEntity.Valid()) {
|
||||||
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
|
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
|
||||||
if (playerModel.Valid()) {
|
if (playerModel.Valid()) {
|
||||||
|
|||||||
@@ -986,7 +986,7 @@
|
|||||||
<c:Animation>
|
<c:Animation>
|
||||||
<AnimationName>DashForwardF</AnimationName>
|
<AnimationName>DashForwardF</AnimationName>
|
||||||
<Time>1</Time>
|
<Time>1</Time>
|
||||||
<Speed>3</Speed>
|
<Speed>1.7999999523162842</Speed>
|
||||||
<Loop>false</Loop>
|
<Loop>false</Loop>
|
||||||
</c:Animation>
|
</c:Animation>
|
||||||
<c:Transform/>
|
<c:Transform/>
|
||||||
@@ -998,7 +998,7 @@
|
|||||||
<c:Animation>
|
<c:Animation>
|
||||||
<AnimationName>DashBackwardF</AnimationName>
|
<AnimationName>DashBackwardF</AnimationName>
|
||||||
<Time>1</Time>
|
<Time>1</Time>
|
||||||
<Speed>3</Speed>
|
<Speed>1.7999999523162842</Speed>
|
||||||
<Loop>false</Loop>
|
<Loop>false</Loop>
|
||||||
</c:Animation>
|
</c:Animation>
|
||||||
<c:Transform/>
|
<c:Transform/>
|
||||||
@@ -1022,7 +1022,7 @@
|
|||||||
<c:Animation>
|
<c:Animation>
|
||||||
<AnimationName>DashLeftF</AnimationName>
|
<AnimationName>DashLeftF</AnimationName>
|
||||||
<Time>1</Time>
|
<Time>1</Time>
|
||||||
<Speed>3</Speed>
|
<Speed>1.7999999523162842</Speed>
|
||||||
<Loop>false</Loop>
|
<Loop>false</Loop>
|
||||||
</c:Animation>
|
</c:Animation>
|
||||||
<c:Transform/>
|
<c:Transform/>
|
||||||
@@ -1034,7 +1034,7 @@
|
|||||||
<c:Animation>
|
<c:Animation>
|
||||||
<AnimationName>DashRightF</AnimationName>
|
<AnimationName>DashRightF</AnimationName>
|
||||||
<Time>1</Time>
|
<Time>1</Time>
|
||||||
<Speed>3</Speed>
|
<Speed>1.7999999523162842</Speed>
|
||||||
<Loop>false</Loop>
|
<Loop>false</Loop>
|
||||||
</c:Animation>
|
</c:Animation>
|
||||||
<c:Transform/>
|
<c:Transform/>
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ void AnimationSystem::UpdateAnimations(double dt)
|
|||||||
void AnimationSystem::UpdateWeights(double dt)
|
void AnimationSystem::UpdateWeights(double dt)
|
||||||
{
|
{
|
||||||
for (auto it = m_AutoBlendQueues.begin(); it != m_AutoBlendQueues.end(); ) {
|
for (auto it = m_AutoBlendQueues.begin(); it != m_AutoBlendQueues.end(); ) {
|
||||||
|
it->second.PrintQueue();
|
||||||
if(it->second.HasActiveBlendJob()) {
|
if(it->second.HasActiveBlendJob()) {
|
||||||
AutoBlendQueue::AutoBlendJob& blendJob = it->second.GetActiveBlendJob();
|
AutoBlendQueue::AutoBlendJob& blendJob = it->second.GetActiveBlendJob();
|
||||||
|
|
||||||
@@ -151,6 +152,7 @@ void AnimationSystem::UpdateWeights(double dt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LOG_INFO("");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AnimationSystem::OnAutoAnimationBlend(Events::AutoAnimationBlend& e)
|
bool AnimationSystem::OnAutoAnimationBlend(Events::AutoAnimationBlend& e)
|
||||||
|
|||||||
@@ -38,11 +38,14 @@ void AutoBlendQueue::Insert(AutoBlendJob autoBlendJob)
|
|||||||
double animationSpeed = (double)autoBlendJob.AnimationEntity["Animation"]["Speed"];
|
double animationSpeed = (double)autoBlendJob.AnimationEntity["Animation"]["Speed"];
|
||||||
double animationTime = (double)autoBlendJob.AnimationEntity["Animation"]["Time"];
|
double animationTime = (double)autoBlendJob.AnimationEntity["Animation"]["Time"];
|
||||||
|
|
||||||
|
if (animationSpeed != 0) {
|
||||||
if ((bool)autoBlendJob.AnimationEntity["Animation"]["Reverse"]) {
|
if ((bool)autoBlendJob.AnimationEntity["Animation"]["Reverse"]) {
|
||||||
AnimationDuration = (animation->Duration * animationSpeed) - (animation->Duration - animationTime);
|
AnimationDuration = (animation->Duration / animationSpeed) - (animation->Duration - animationTime);
|
||||||
|
} else {
|
||||||
|
AnimationDuration = (animation->Duration / animationSpeed) - animationTime;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
AnimationDuration = (animation->Duration * animationSpeed) - animationTime;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
blendNode.StartTime += AnimationDuration;
|
blendNode.StartTime += AnimationDuration;
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e)
|
|||||||
if (controller->Movement().x > 0) {
|
if (controller->Movement().x > 0) {
|
||||||
{
|
{
|
||||||
Events::AutoAnimationBlend aeb;
|
Events::AutoAnimationBlend aeb;
|
||||||
aeb.Duration = 0.3;
|
aeb.Duration = 0.1;
|
||||||
aeb.NodeName = "DashRight";
|
aeb.NodeName = "DashRight";
|
||||||
aeb.RootNode = playerModel;
|
aeb.RootNode = playerModel;
|
||||||
aeb.Restart = true;
|
aeb.Restart = true;
|
||||||
@@ -367,19 +367,19 @@ bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e)
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
Events::AutoAnimationBlend aeb;
|
Events::AutoAnimationBlend aeb;
|
||||||
aeb.Duration = 0.3;
|
aeb.Duration = 0.2;
|
||||||
aeb.NodeName = "StandCrouchBlend";
|
aeb.NodeName = "StandCrouchBlend";
|
||||||
aeb.RootNode = playerModel;
|
aeb.RootNode = playerModel;
|
||||||
aeb.Delay = -0.3;
|
aeb.Delay = 0.2;
|
||||||
aeb.Start = true;
|
aeb.Start = true;
|
||||||
aeb.Restart = false;
|
aeb.Restart = false;
|
||||||
aeb.AnimationEntity = playerModel.FirstChildByName("DashForward");
|
aeb.AnimationEntity = playerModel.FirstChildByName("DashRight");
|
||||||
m_EventBroker->Publish(aeb);
|
m_EventBroker->Publish(aeb);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
{
|
{
|
||||||
Events::AutoAnimationBlend aeb;
|
Events::AutoAnimationBlend aeb;
|
||||||
aeb.Duration = 0.3;
|
aeb.Duration = 0.1;
|
||||||
aeb.NodeName = "DashLeft";
|
aeb.NodeName = "DashLeft";
|
||||||
aeb.RootNode = playerModel;
|
aeb.RootNode = playerModel;
|
||||||
aeb.Restart = true;
|
aeb.Restart = true;
|
||||||
@@ -388,13 +388,13 @@ bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e)
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
Events::AutoAnimationBlend aeb;
|
Events::AutoAnimationBlend aeb;
|
||||||
aeb.Duration = 0.3;
|
aeb.Duration = 0.2;
|
||||||
aeb.NodeName = "StandCrouchBlend";
|
aeb.NodeName = "StandCrouchBlend";
|
||||||
aeb.RootNode = playerModel;
|
aeb.RootNode = playerModel;
|
||||||
aeb.Delay = -0.3;
|
aeb.Delay = 0.2;
|
||||||
aeb.Start = true;
|
aeb.Start = true;
|
||||||
aeb.Restart = false;
|
aeb.Restart = false;
|
||||||
aeb.AnimationEntity = playerModel.FirstChildByName("DashForward");
|
aeb.AnimationEntity = playerModel.FirstChildByName("DashLeft");
|
||||||
m_EventBroker->Publish(aeb);
|
m_EventBroker->Publish(aeb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -402,7 +402,7 @@ bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e)
|
|||||||
if (controller->Movement().z < 0) {
|
if (controller->Movement().z < 0) {
|
||||||
{
|
{
|
||||||
Events::AutoAnimationBlend aeb;
|
Events::AutoAnimationBlend aeb;
|
||||||
aeb.Duration = 0.3;
|
aeb.Duration = 0.1;
|
||||||
aeb.NodeName = "DashForward";
|
aeb.NodeName = "DashForward";
|
||||||
aeb.RootNode = playerModel;
|
aeb.RootNode = playerModel;
|
||||||
aeb.Restart = true;
|
aeb.Restart = true;
|
||||||
@@ -411,10 +411,10 @@ bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e)
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
Events::AutoAnimationBlend aeb;
|
Events::AutoAnimationBlend aeb;
|
||||||
aeb.Duration = 0.3;
|
aeb.Duration = 0.2;
|
||||||
aeb.NodeName = "StandCrouchBlend";
|
aeb.NodeName = "StandCrouchBlend";
|
||||||
aeb.RootNode = playerModel;
|
aeb.RootNode = playerModel;
|
||||||
aeb.Delay = -0.3;
|
aeb.Delay = 0.2;
|
||||||
aeb.Start = true;
|
aeb.Start = true;
|
||||||
aeb.Restart = false;
|
aeb.Restart = false;
|
||||||
aeb.AnimationEntity = playerModel.FirstChildByName("DashForward");
|
aeb.AnimationEntity = playerModel.FirstChildByName("DashForward");
|
||||||
@@ -423,7 +423,7 @@ bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e)
|
|||||||
} else {
|
} else {
|
||||||
{
|
{
|
||||||
Events::AutoAnimationBlend aeb;
|
Events::AutoAnimationBlend aeb;
|
||||||
aeb.Duration = 0.3;
|
aeb.Duration = 0.1;
|
||||||
aeb.NodeName = "DashBackward";
|
aeb.NodeName = "DashBackward";
|
||||||
aeb.RootNode = playerModel;
|
aeb.RootNode = playerModel;
|
||||||
aeb.Restart = true;
|
aeb.Restart = true;
|
||||||
@@ -432,29 +432,30 @@ bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e)
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
Events::AutoAnimationBlend aeb;
|
Events::AutoAnimationBlend aeb;
|
||||||
aeb.Duration = 0.3;
|
aeb.Duration = 0.2;
|
||||||
aeb.NodeName = "StandCrouchBlend";
|
aeb.NodeName = "StandCrouchBlend";
|
||||||
aeb.RootNode = playerModel;
|
aeb.RootNode = playerModel;
|
||||||
aeb.Delay = -0.3;
|
aeb.Delay = 0.2;
|
||||||
aeb.Start = true;
|
aeb.Start = true;
|
||||||
aeb.Restart = false;
|
aeb.Restart = false;
|
||||||
aeb.AnimationEntity = playerModel.FirstChildByName("DashForward");
|
aeb.AnimationEntity = playerModel.FirstChildByName("DashBackward");
|
||||||
m_EventBroker->Publish(aeb);
|
m_EventBroker->Publish(aeb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* EntityWrapper dashEffectModel;
|
EntityWrapper dashEffectModel;
|
||||||
dashEffectModel = playerModel.Clone(dashEffect);
|
dashEffectModel = playerModel.Clone();
|
||||||
player["Transform"].Copy(dashEffectModel["Transform"]);
|
player["Transform"].Copy(dashEffectModel["Transform"]);
|
||||||
|
|
||||||
|
|
||||||
dashEffectModel.AttachComponent("ExplosionEffect");
|
/* dashEffectModel.AttachComponent("ExplosionEffect");
|
||||||
dashEffectModel["ExplosionEffect"]["EndColor"] = (glm::vec4)playerModel["Model"]["Color"];
|
dashEffectModel["ExplosionEffect"]["EndColor"] = (glm::vec4)playerModel["Model"]["Color"];
|
||||||
((glm::vec4&)dashEffectModel["ExplosionEffect"]["EndColor"]).w = 0.f;
|
((glm::vec4&)dashEffectModel["ExplosionEffect"]["EndColor"]).w = 0.f;
|
||||||
(double&)dashEffectModel["ExplosionEffect"]["ExplosionDuration"] = dashEffect["Lifetime"]["Lifetime"];
|
(double&)dashEffectModel["ExplosionEffect"]["ExplosionDuration"] = dashEffect["Lifetime"]["Lifetime"];
|
||||||
(glm::vec3&)dashEffectModel["ExplosionEffect"]["ExplosionOrigin"] = glm::vec3(0, 1, 0) + (0.2f * controller->Movement());
|
(glm::vec3&)dashEffectModel["ExplosionEffect"]["ExplosionOrigin"] = glm::vec3(0, 1, 0) + (0.2f * controller->Movement());
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -462,18 +463,9 @@ bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e)
|
|||||||
|
|
||||||
for (auto animationEntity : animationChildren) {
|
for (auto animationEntity : animationChildren) {
|
||||||
(bool&)animationEntity["Animation"]["Play"] = false;
|
(bool&)animationEntity["Animation"]["Play"] = false;
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user