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

大酒店网站源代码室内设计效果图在哪里找

大酒店网站源代码,室内设计效果图在哪里找,企业 网站建设,制作免费制作个人网站怎么做注:1.这个分类是按照源码里的注释分类的 2.本篇是通读并给出一些注释形式的,并不涉及结构性的分析 3.看之前要对UE的GAS系统的定义有初步了解 4.因为都是接口函数,有些没细看的研究那一部分的时候会细看 1 一些接口函数,但是…

注:1.这个分类是按照源码里的注释分类的

2.本篇是通读并给出一些注释形式的,并不涉及结构性的分析

3.看之前要对UE的GAS系统的定义有初步了解

4.因为都是接口函数,有些没细看的研究那一部分的时候会细看

1  一些接口函数,但是注释说不要直接调用要通过GameplayCueManager调用

// Do not call these functions directly, call the wrappers on GameplayCueManager insteadUFUNCTION(NetMulticast, unreliable)void NetMulticast_InvokeGameplayCueExecuted_FromSpec(const FGameplayEffectSpecForRPC Spec, FPredictionKey PredictionKey) override;UFUNCTION(NetMulticast, unreliable)void NetMulticast_InvokeGameplayCueExecuted(const FGameplayTag GameplayCueTag, FPredictionKey PredictionKey, FGameplayEffectContextHandle EffectContext) override;UFUNCTION(NetMulticast, unreliable)void NetMulticast_InvokeGameplayCuesExecuted(const FGameplayTagContainer GameplayCueTags, FPredictionKey PredictionKey, FGameplayEffectContextHandle EffectContext) override;UFUNCTION(NetMulticast, unreliable)void NetMulticast_InvokeGameplayCueExecuted_WithParams(const FGameplayTag GameplayCueTag, FPredictionKey PredictionKey, FGameplayCueParameters GameplayCueParameters) override;UFUNCTION(NetMulticast, unreliable)void NetMulticast_InvokeGameplayCuesExecuted_WithParams(const FGameplayTagContainer GameplayCueTags, FPredictionKey PredictionKey, FGameplayCueParameters GameplayCueParameters) override;UFUNCTION(NetMulticast, unreliable)void NetMulticast_InvokeGameplayCueAdded(const FGameplayTag GameplayCueTag, FPredictionKey PredictionKey, FGameplayEffectContextHandle EffectContext) override;UFUNCTION(NetMulticast, unreliable)void NetMulticast_InvokeGameplayCueAdded_WithParams(const FGameplayTag GameplayCueTag, FPredictionKey PredictionKey, FGameplayCueParameters Parameters) override;UFUNCTION(NetMulticast, unreliable)void NetMulticast_InvokeGameplayCueAddedAndWhileActive_FromSpec(const FGameplayEffectSpecForRPC& Spec, FPredictionKey PredictionKey) override;UFUNCTION(NetMulticast, unreliable)void NetMulticast_InvokeGameplayCueAddedAndWhileActive_WithParams(const FGameplayTag GameplayCueTag, FPredictionKey PredictionKey, FGameplayCueParameters GameplayCueParameters) override;UFUNCTION(NetMulticast, unreliable)void NetMulticast_InvokeGameplayCuesAddedAndWhileActive_WithParams(const FGameplayTagContainer GameplayCueTags, FPredictionKey PredictionKey, FGameplayCueParameters GameplayCueParameters) override;

2 ExecuteGameplayCue相关

注释翻译:GameplayCues也可以独立出现,这些函数接受一个可选的效果上下文,用于传递命中结果等信息

一个是传入GEContextHandle版本的,一个是传入FGameplayCueParameters版本的

声明如下:

/** GameplayCues can also come on their own. These take an optional effect context to pass through hit result, etc */void ExecuteGameplayCue(const FGameplayTag GameplayCueTag, FGameplayEffectContextHandle EffectContext = FGameplayEffectContextHandle());void ExecuteGameplayCue(const FGameplayTag GameplayCueTag, const FGameplayCueParameters& GameplayCueParameters);

实现就是调用GameplayCueManager里的函数:

void UAbilitySystemComponent::ExecuteGameplayCue(const FGameplayTag GameplayCueTag, FGameplayEffectContextHandle EffectContext)
{// Send to the wrapper on the cue managerUAbilitySystemGlobals::Get().GetGameplayCueManager()->InvokeGameplayCueExecuted(this, GameplayCueTag, ScopedPredictionKey, EffectContext);
}void UAbilitySystemComponent::ExecuteGameplayCue(const FGameplayTag GameplayCueTag, const FGameplayCueParameters& GameplayCueParameters)
{// Send to the wrapper on the cue managerUAbilitySystemGlobals::Get().GetGameplayCueManager()->InvokeGameplayCueExecuted_WithParams(this, GameplayCueTag, ScopedPredictionKey, GameplayCueParameters);
}

 先大致看下实现可以发现逻辑都一样,都是先检查有效性,再构造FGameplayCuePendingExecute PendingCue,再调用AddPendingCueExecuteInternal,唯一不一样的地方就是初始化PendingCue.CueParameters这个参数的方式不一样,WithParams版本的很简单,就是直接赋值,下面去找下InitGameplayCueParameters这个函数,里边重点就这一行:

CueParameters.EffectContext = EffectContext;

这里贴的实现: 

void UGameplayCueManager::InvokeGameplayCueExecuted(UAbilitySystemComponent* OwningComponent, const FGameplayTag GameplayCueTag, FPredictionKey PredictionKey, FGameplayEffectContextHandle EffectContext)
{if (EnableSuppressCuesOnGameplayCueManager && OwningComponent && OwningComponent->bSuppressGameplayCues){return;}if (OwningComponent){FGameplayCuePendingExecute PendingCue;PendingCue.PayloadType = EGameplayCuePayloadType::CueParameters;PendingCue.GameplayCueTags.Add(GameplayCueTag);PendingCue.OwningComponent = OwningComponent;UAbilitySystemGlobals::Get().InitGameplayCueParameters(PendingCue.CueParameters, EffectContext);PendingCue.PredictionKey = PredictionKey;AddPendingCueExecuteInternal(PendingCue);}
}void UGameplayCueManager::InvokeGameplayCueExecuted_WithParams(UAbilitySystemComponent* OwningComponent, const FGameplayTag GameplayCueTag, FPredictionKey PredictionKey, FGameplayCueParameters GameplayCueParameters)
{if (EnableSuppressCuesOnGameplayCueManager && OwningComponent && OwningComponent->bSuppressGameplayCues){return;}if (OwningComponent){FGameplayCuePendingExecute PendingCue;PendingCue.PayloadType = EGameplayCuePayloadType::CueParameters;PendingCue.GameplayCueTags.Add(GameplayCueTag);PendingCue.OwningComponent = OwningComponent;PendingCue.CueParameters = GameplayCueParameters;PendingCue.PredictionKey = PredictionKey;AddPendingCueExecuteInternal(PendingCue);}
}

顺着思路看AddPendingCueExecuteInternal:

发现就是把他加入了执行队列,但是没有真正执行

void UGameplayCueManager::AddPendingCueExecuteInternal(FGameplayCuePendingExecute& PendingCue)
{if (ProcessPendingCueExecute(PendingCue)){PendingExecuteCues.Add(PendingCue);}if (GameplayCueSendContextCount == 0){// Not in a context, flush nowFlushPendingCues();}
}

 再去看FlushPendingCues这个函数:

函数体太长了,核心就是调用这两个函数:

诶惊奇的发现就是前面第一部分里不让你直接调用的接口函数,找了一圈RepInterface也是调用接口函数,所以最后除了各个函数的条件判断不太一样,都是调用的ASC中的InvokeGameplayCueEvent

RepInterface->Call_InvokeGameplayCueExecuted_WithParams
PendingCue.OwningComponent->InvokeGameplayCueEvent

这里的RepInterface:

IAbilitySystemReplicationProxyInterface* RepInterface = PendingCue.OwningComponent->GetReplicationInterface();

再顺着看Invoke这个函数,发现都调用GameplayCueManager的HandleGameplayCue

UAbilitySystemGlobals::Get().GetGameplayCueManager()->HandleGameplayCue

GC中的HandleGameplayCue会先将标签翻译,然后路由,路由中的具体处理:

CueSet和Interface调用HandleGameplayCue,其中的GameplayCueInterface:

Cast<IGameplayCueInterface>(TargetActor) 
	// Give the global set a chanceif (bAcceptsCue && !(Options & EGameplayCueExecutionOptions::IgnoreNotifies)){RuntimeGameplayCueObjectLibrary.CueSet->HandleGameplayCue(TargetActor, GameplayCueTag, EventType, Parameters);}// Use the interface even if it's not in the mapif (GameplayCueInterface && bAcceptsCue){GameplayCueInterface->HandleGameplayCue(TargetActor, GameplayCueTag, EventType, Parameters);}

Interface中的Handle会处理函数列表,最后转到默认处理函数,子类可以实现

而CueSet中调用这个函数:

UGameplayCueSet::HandleGameplayCueNotify_Internal

会分UGameplayCueNotify_Static和AGameplayCueNotify_Actor处理具体逻辑,到这就各种信息检索完了,进入具体的处理逻辑,之后就要进入这两个类里看了,这里就不继续看了

3 AddGameplayCue

/** Add a persistent gameplay cue */void AddGameplayCue(const FGameplayTag GameplayCueTag, FGameplayEffectContextHandle EffectContext = FGameplayEffectContextHandle());void AddGameplayCue(const FGameplayTag GameplayCueTag, const FGameplayCueParameters& GameplayCueParameters);

套娃到这里:

这个函数大体逻辑:

  1. 检查是否是服务器

  2. 检查是否已经存在该提示:避免重复添加

  3. 强制网络同步:确保客户端能够接收到最新的游戏玩法提示

  4. 添加GC到容器

  5. 处理混合复制模式:根据复制模式调整预测Key

  6. 调用RPC播放激活事件:通过RPC将游戏玩法提示同步到客户端

  7. 触发服务器端事件:在服务器端触发 WhileActive 事件

  8. 客户端预测逻辑:在客户端预测性地添加GC,并触发事件

void UAbilitySystemComponent::AddGameplayCue_Internal(const FGameplayTag GameplayCueTag, const FGameplayCueParameters& GameplayCueParameters, FActiveGameplayCueContainer& GameplayCueContainer)
{if (IsOwnerActorAuthoritative()){const bool bWasInList = GameplayCueContainer.HasCue(GameplayCueTag);ForceReplication();GameplayCueContainer.AddCue(GameplayCueTag, ScopedPredictionKey, GameplayCueParameters);// For mixed minimal replication mode, we do NOT want the owning client to play the OnActive event through this RPC, since it will get the full replicated // GE in its AGE array. Generate a server-side prediction key for it, which it will look for on the _Implementation function and ignore. (<--- Original Hack){FPredictionKey PredictionKeyForRPC = ScopedPredictionKey; // Key we send for RPC. Start with the regular old ScopedPredictionKey// Special stuff for mixed replication modeif (ReplicationMode == EGameplayEffectReplicationMode::Mixed){if (GameplayCueContainer.bMinimalReplication){// For *replicated to sim proxies only* container, Create a Server Initiated PK to avoid double playing on the auto proxy in mixed replication mode (Original Hack)PredictionKeyForRPC = FPredictionKey::CreateNewServerInitiatedKey(this);}else{// For "replicated to everyone" cue container, we need to clear server replicated prediction keys, or else they will trip the same absorption code that we added for the first hack above.// Its ok to just throw out a server replicated prediction key because (outside of mixed replication mode) it will not affect what the client does in NetMulticast_InvokeGameplayCueAdded_WithParams_Implementation// (E.g, the client only skips the InvokeCall if the key is locally generated, not for server generated ones anways)if (ScopedPredictionKey.IsServerInitiatedKey()){PredictionKeyForRPC = FPredictionKey();}}}// Finally, call the RPC to play the OnActive eventif (IAbilitySystemReplicationProxyInterface* ReplicationInterface = GetReplicationInterface()){ReplicationInterface->Call_InvokeGameplayCueAdded_WithParams(GameplayCueTag, PredictionKeyForRPC, GameplayCueParameters);}}if (!bWasInList){// Call on server here, clients get it from repnotifyInvokeGameplayCueEvent(GameplayCueTag, EGameplayCueEvent::WhileActive, GameplayCueParameters);}}else if (ScopedPredictionKey.IsLocalClientKey()){GameplayCueContainer.PredictiveAdd(GameplayCueTag, ScopedPredictionKey);// Allow for predictive gameplaycue events? Needs more thoughtInvokeGameplayCueEvent(GameplayCueTag, EGameplayCueEvent::OnActive, GameplayCueParameters);InvokeGameplayCueEvent(GameplayCueTag, EGameplayCueEvent::WhileActive, GameplayCueParameters);}
}

4 RemoveGameplayCue

/** Remove a persistent gameplay cue */void RemoveGameplayCue(const FGameplayTag GameplayCueTag);

 去到了Container里处理Remove,这里就不深入了,具体研究GC会继续看

void UAbilitySystemComponent::RemoveGameplayCue_Internal(const FGameplayTag GameplayCueTag, FActiveGameplayCueContainer& GameplayCueContainer)
{if (IsOwnerActorAuthoritative()){GameplayCueContainer.RemoveCue(GameplayCueTag);}else if (ScopedPredictionKey.IsLocalClientKey()){GameplayCueContainer.PredictiveRemove(GameplayCueTag);}
}

总结:1.以上就是几个关键的函数,但都是偏向的都是调用的整体逻辑,没有深入具体的实现,留坑()

2.按着我看的顺序来的,并非实际调用顺序

http://www.yayakq.cn/news/829976/

相关文章:

  • 小网站搜什么关键词好泰兴中信建设有限责任公司
  • asia域名的网站常州创新优典网站建设
  • 北京网站开发制作公司网站建设介绍ppt
  • 最新汽车网站大全昆明室内设计学校
  • 网站图片描述怎么写关键词林俊杰百度云
  • 那些企业网站做的漂亮网络营销方案的制定思路
  • 做淘客网站多少钱windows 安装 wordpress
  • 网页设计的交流网站个人能建网站吗
  • 衡水做wap网站建设网站域名到期不续费会怎么样
  • 企业网站建设人员分析wordpress 安装 服务器 系统
  • 磁力网站怎么做的源码百度seo排名如何提升
  • 如何用服务器建设网站河北省住房及城乡建设部网站
  • 网站建设功能需求分析下载百度app下载
  • 厦门网站专业建设一小时做网站
  • 网站设置专栏有什么好处所有做运动的网站
  • 湖北网站设计流程换ip 撞库 Wordpress
  • 互联国际网站数据做图网站有哪些
  • 拖拽式wordpress建站排名优化工具
  • 莆田网站建设外贸免费的200m网站空间
  • 泰安网站推广 泰安网站建设重庆城乡建设信息网官网
  • 易优cms企业网站管理系统识图找图
  • 广州知名网站建设有哪些网络推广100种方法
  • 最近网站改版文章突然不收录wordpress 主题制作 视频 教程
  • 坪山网站建设特色广告公司取名大全集
  • 做网站规避什么有空间站的国家
  • 网站建设与管理2018珠海免费网站建设
  • 云南网站开发报价怎样做投资理财网站
  • 国贸网站建设域名备案查询工信部
  • dw网站设计步骤网站建设 软件开发的公司
  • 北京市建设网站首页室内设计可以去哪些公司