public CAbilitySystem Target; // Target we intend to apply to public CGameplayEffectModCallbackData(CEffect inEffectSpec, CGamePlayModifierEvaluatedData inEvaluatedData, CAbilitySystem inTarget) { EffectSpec = inEffectSpec; EvaluatedData = inEvaluatedData; Target = inTarget; }
/// <summary> /// 给owner创建一个Effect组件, 并挂在Effect Child Layer身上 /// </summary> public static CEffect Create(string meta, IGameplayAbilityUnit owner) { CEffect eff = null; CEffectMeta emeta = CEffectMetaManager.GetMeta(meta); if (owner == null) { Debug.LogError("We can not get GameObject which effect attach on " + meta); return(null); } GameObject go = owner.EffectLayer; switch (emeta.Type) { case CEffectMeta.EffectType.LaunchMissle: eff = go.AddComponent <CEffectLaunchMissile>(); eff.EffectName = meta; break; case CEffectMeta.EffectType.Damage: eff = go.AddComponent <CEffectDamage>(); eff.EffectName = meta; break; case CEffectMeta.EffectType.ApplyBehaviour: eff = go.AddComponent <CEffectApplyBuff>(); eff.EffectName = meta; break; case CEffectMeta.EffectType.IssueOrder: eff = go.AddComponent <CEffectIssueOrder>(); eff.EffectName = meta; break; case CEffectMeta.EffectType.EnumArea: eff = go.AddComponent <CEffectEnumArea>(); eff.EffectName = meta; break; case CEffectMeta.EffectType.EffectSet: eff = go.AddComponent <CEffectSet>(); eff.EffectName = meta; break; } return(eff); }