/// <summary> /// 是否结盟 /// </summary> public static bool areAllied(Camp campL, Camp campR) { if (campL == campR) { return(true); } return(CampAllianceList[MathSystem.UpTriangleIndex((int)campL, (int)campR)]); }
/// <summary> /// 使结盟 /// </summary> public static void Ally(Camp campL, Camp campR) { if (campL == campR) { return; } CampAllianceList[MathSystem.UpTriangleIndex((int)campL, (int)campR)] = true; }
/// <summary> /// 解除结盟 /// </summary> public static void Dissolve(Camp campL, Camp campR) { if (campL == campR) { Debug.LogError("无法和自己阵营解除同盟关系!"); return; } CampAllianceList[MathSystem.UpTriangleIndex((int)campL, (int)campR)] = false; }