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