public void Combine(RoleAValue srcXValue) // 将srcFValue的属性数值合并给自己 { if (srcXValue == null) { return; } for (int i = 0; i < (int)AValueType.Count; ++i) { Values[i] += srcXValue.Values[i]; } }
void CalculateOne(RoleAValue result, AValueMask pMask, int valueID, AValueData pData, RoleAValue pTransformAV) { float extraBase = null == pTransformAV ? 0.0f : pTransformAV.Values[valueID]; if (null != pData) { result.Values[valueID] = pData.Calculate(false, extraBase); } else { result.Values[valueID] = extraBase; } }
public void Calculate(RoleAValue result, AValueMask pMask, int groupFlag = (int)AValue_GroupType.AValue_GroupBoth, RoleAValue pTransformAV = null) { int locali = (int)AValue_GroupType.AValue_GroupExtend; locali = (groupFlag & locali); if (locali > 0) { foreach (KeyValuePair <int, AValueData> item in Datas) { UnityEngine.Debug.Log("item = " + item); CalculateOne(result, pMask, item.Key, item.Value, pTransformAV); } } }
public void Combine(RoleAValue srcXValue, AValueMask pMask) { if (srcXValue == null) { return; } if (pMask == null) { for (int i = 0; i < (int)AValueType.Count; ++i) { Values[i] += srcXValue.Values[i]; } } else { for (int i = 0; i < (int)AValueType.Count; ++i) { if (pMask.Mask[i]) { Values[i] += srcXValue.Values[i]; } } } }
public void CalcOriginResult(AValueStruct vs, AValueMask pMask, ref RoleAValue av) { av.Reset(pMask); vs.Calculate(av, pMask); }
public void Copy(RoleAValue r) { Values = r.Values; }