/** * 精确匹配, A.b 只能匹配 A.b */ public bool MatchesTagExact(CGameplayTag TagToCheck) { if (!TagToCheck.IsValid()) { return(false); } return(string.Equals(TagName, TagToCheck.TagName)); }
/** * 本tag是否和TagToCheck匹配 * TagToCheck如果不合法, 则返回false * 另外, A.b 匹配 A, 但A不匹配A.b */ public bool MatchesTag(CGameplayTag TagToCheck) { var container = CGameplayTagsManager.Instance.GetSingleTagContainer(this); if (container == null) { return(false); } return(container.HasTag(TagToCheck)); }
/* Called for predictively added gameplay cue. Needs to remove tag count and possible invoke OnRemove event if misprediction */ public void OnPredictiveGameplayCueCatchup(CGameplayTag Tag) { }
/* Needed for delegate callback for tag prediction */ public void RemoveOneTagCount_NoReturn(CGameplayTag Tag) { //UpdateTagMap(Tag, -1); }
/* Returns the magnitude of a SetByCaller modifier. Will return 0.f and Warn if the magnitude has not been set. */ public float GetSetByCallerMagnitude(CGameplayTag DataTag, bool WarnIfNotFound = true, float DefaultIfNotFound = 0f) { return(1f); }
/* Sets the magnitude of a SetByCaller modifier */ public void SetSetByCallerMagnitude(CGameplayTag DataTag, float Magnitude) { }
/** * 检测 两个tag有多相近, 返回值越小说明越相近 * 比如A.b.c 和A.b.d 就比 A.b.c和A.c更相近 */ public int MatchesTagDepth(CGameplayTag TagToCheck) { return(CGameplayTagsManager.Instance.GameplayTagsMatchDepth(this, TagToCheck)); }
/** Used so we can have a TMap of this struct * 我可以用静态id来实现 */ public int GetTypeHash(CGameplayTag Tag) { return(1); }