当前位置: 首页 > wzjs >正文

安阳市住房和城乡建设厅网站网站建设购销合同

安阳市住房和城乡建设厅网站,网站建设购销合同,非国产手机浏览器,企业网站 实名认证制作眩晕功能 添加眩晕标签 添加一个眩晕标签 CRUNCH_API UE_DECLARE_GAMEPLAY_TAG_EXTERN(Stats_Stun)UE_DEFINE_GAMEPLAY_TAG_COMMENT(Stats_Stun, "Stats.Stun", "眩晕")使用GE来定制眩晕的时长 创建一个GE设置一个定长的眩晕GE造成伤害的GE处添加眩晕G…

制作眩晕功能

添加眩晕标签

添加一个眩晕标签

CRUNCH_API UE_DECLARE_GAMEPLAY_TAG_EXTERN(Stats_Stun)
UE_DEFINE_GAMEPLAY_TAG_COMMENT(Stats_Stun, "Stats.Stun", "眩晕")

使用GE来定制眩晕的时长

创建一个GE设置一个定长的眩晕GE
在这里插入图片描述
造成伤害的GE处添加眩晕GE
在这里插入图片描述
输入AbilitySystem.DebugAbilityTags就能看到赋予的Tag
在这里插入图片描述
在这里插入图片描述

添加对眩晕标签的处理,以及添加眩晕动画

到角色基类中添加对接收眩晕Tag的处理

#pragma region GAS组件相关
private:// 眩晕标签的更新void StunTagUpdated(const FGameplayTag Tag, int32 NewCount);
#pragma endregion#pragma region 眩晕(Stun)
private:UPROPERTY(EditDefaultsOnly, Category = "Stun")UAnimMontage* StunMontage;virtual void OnStun();virtual void OnRecoverFromStun();
#pragma endregion
void ACCharacter::BindGASChangeDelegates()
{if (CAbilitySystemComponent){CAbilitySystemComponent->RegisterGameplayTagEvent(TGameplayTags::Stats_Dead).AddUObject(this, &ACCharacter::DeathTagUpdated);CAbilitySystemComponent->RegisterGameplayTagEvent(TGameplayTags::Stats_Stun).AddUObject(this, &ACCharacter::StunTagUpdated);}
}
void ACCharacter::StunTagUpdated(const FGameplayTag Tag, int32 NewCount)
{if (IsDead()) return;if (NewCount != 0){OnStun();PlayAnimMontage(StunMontage);}else{OnRecoverFromStun();StopAnimMontage(StunMontage);}
}void ACCharacter::OnStun()
{
}void ACCharacter::OnRecoverFromStun()
{
}

在子类中重写获得眩晕标签和移除眩晕标签的函数
CPlayerCharacter

#pragma region 眩晕(Stun)
private:virtual void OnStun();virtual void OnRecoverFromStun();
#pragma endregion

眩晕了无法操作跟死亡一样禁用玩家的输入,解除眩晕的时候判断一下是否死亡,不然就会诈尸了

void ACPlayerCharacter::OnStun()
{SetInputEnabledFromPlayerController(false);
}void ACPlayerCharacter::OnRecoverFromStun()
{if (IsDead()) return;SetInputEnabledFromPlayerController(true);
}

另外还需要处理AI

	// 监听Pawn眩晕Tag变化,控制AI逻辑启停void PawnStunTagUpdated(const FGameplayTag Tag, int32 Count);// 标记AI当前是否处于死亡状态bool bIsPawnDead = false;

在死亡标签变化的时候修改布尔变量

void ACAIController::OnPossess(APawn* InPawn)
{Super::OnPossess(InPawn);UAbilitySystemComponent* PawnASC = UAbilitySystemBlueprintLibrary::GetAbilitySystemComponent(InPawn);if (PawnASC){PawnASC->RegisterGameplayTagEvent(TGameplayTags::Stats_Dead, EGameplayTagEventType::NewOrRemoved).AddUObject(this, &ACAIController::PawnDeadTagUpdated);PawnASC->RegisterGameplayTagEvent(TGameplayTags::Stats_Stun).AddUObject(this, &ACAIController::PawnStunTagUpdated);}
}void ACAIController::PawnDeadTagUpdated(const FGameplayTag Tag, int32 Count)
{if (Count != 0){GetBrainComponent()->StopLogic("Dead"); // 停止死亡状态下的逻辑ClearAndDisableAllSenses(); // 清除感知数据bIsPawnDead = true;}else{GetBrainComponent()->StartLogic(); // 重新启动AI逻辑EnableAllSenses(); // 启用感知系统bIsPawnDead = false;}
}void ACAIController::PawnStunTagUpdated(const FGameplayTag Tag, int32 Count)
{if (bIsPawnDead) return;if (Count != 0){GetBrainComponent()->StopLogic("Stun");}else{GetBrainComponent()->StartLogic();}
}

在技能的基类中,从构造函数中添加阻止标签,眩晕不能用技能,再去被动技能中移除这个标签。

UCGameplayAbility::UCGameplayAbility()
{// 眩晕状态无法激活技能ActivationBlockedTags.AddTag(TGameplayTags::Stats_Stun);
}
UGAP_Launched::UGAP_Launched()
{// 设置网络执行策略为仅在服务器端执行NetExecutionPolicy = EGameplayAbilityNetExecutionPolicy::ServerOnly;// 创建一个新触发数据对象FAbilityTriggerData TriggerData;// 设置触发数据的触发源为游戏事件TriggerData.TriggerSource = EGameplayAbilityTriggerSource::GameplayEvent;// 设置触发数据的触发标签为击飞被动技能激活标签TriggerData.TriggerTag = GetLaunchedAbilityActivationTag();//TGameplayTags::Ability_Passive_Launch_Activate;// 移除被击飞技能的禁用眩晕标签ActivationBlockedTags.RemoveTag(TGameplayTags::Stats_Stun);// 将创建的触发数据添加到能力触发器列表中AbilityTriggers.Add(TriggerData);
}

添加小兵的死亡动画以及眩晕动画,依旧是关闭自动混出功能,设置一下对应的插槽
在这里插入图片描述
在这里插入图片描述
设置一下死亡动画,偏移时间调为0
在这里插入图片描述
再设置一下眩晕蒙太奇
在这里插入图片描述
设置一个机器人的眩晕蒙太奇
在这里插入图片描述
顺利的播放了蒙太奇动画
在这里插入图片描述


文章转载自:

http://GmZR1inQ.zycLL.cn
http://kGsaZUwq.zycLL.cn
http://Hj0zuogk.zycLL.cn
http://RHlxARKw.zycLL.cn
http://xR0s1Qz5.zycLL.cn
http://s11Hcfbz.zycLL.cn
http://MSa4rTgA.zycLL.cn
http://ORZam3XR.zycLL.cn
http://0z94HjgY.zycLL.cn
http://dtw2A15S.zycLL.cn
http://3DBD8pJp.zycLL.cn
http://E1UgB4J9.zycLL.cn
http://GV3Oh1cx.zycLL.cn
http://IymIYNd8.zycLL.cn
http://mcprrvsN.zycLL.cn
http://cq0pNPN3.zycLL.cn
http://6MXTdhlX.zycLL.cn
http://zYz8TfrX.zycLL.cn
http://Xf7kw3R5.zycLL.cn
http://tjqTUJGa.zycLL.cn
http://3devmk75.zycLL.cn
http://KfC2hL4O.zycLL.cn
http://hq5Cz0rJ.zycLL.cn
http://IKhNwDVr.zycLL.cn
http://snTQ7yET.zycLL.cn
http://DeopB9ee.zycLL.cn
http://oorn6MoT.zycLL.cn
http://SNB9fafs.zycLL.cn
http://OyIUwUM0.zycLL.cn
http://eYQQlp5O.zycLL.cn
http://www.dtcms.com/wzjs/646474.html

相关文章:

  • 网站设计制作的特点有哪些商业空间设计风格
  • 耐思尼克网站wordpress 整站
  • 怀化电视台网站关键词推广技巧
  • 一锅汤资源分享网站建设大全discuz门户论坛模板
  • 做网站资讯专业网站开发工具
  • 高端网站建设968遵义营商环境建设局网站
  • 公司网站开发费分录是wordpress 页头
  • 运城网站制作公司安阳后营吧
  • 公司网站建设 目录网站服务器用什么好处
  • 天津网站制作企业球队世界排名榜
  • 网站关键词优化外包被禁止访问网站怎么办
  • 梅林网站建设wordpress插件 标签页
  • 400电话网络推广商城网站建设电影网站选服务器怎么选
  • seo 网站标题长度简易蜘蛛池网站开发
  • 模板 网站 教程为什么外包会把人干废
  • 阿里云做视频网站可以吗广东广州专业网络营销公司
  • 西安企业做网站多少钱软件推广简报
  • 西安网站建设技术网页制作和网页制作
  • 杭州市建设监理协会网站佛山网站建设多少钱
  • 手表拍卖网站社交网站推广怎么做
  • 手机网站怎么做微信登陆6个人备案网站可以做产品推广
  • 耒阳市做网站的ps做网站页面美工
  • wordpress分站wordpress无编辑器
  • 甜蜜高端定制网站怎样建个小公司的网站
  • 百度网站建设电话做ps图标什么网站最好
  • 淄博想建网站做红酒闪购的网站有哪些
  • 网页建站点企业网站做速优化排名万象
  • 如何在百度做网站推广html5网站开发价格
  • 建设网站服务器目前主流网站开发所用软件
  • 制作网站流程深圳公司网站搭建公司