示例#1
0
    void RotBack(int situation)
    {
        switch (situation)
        {
        case 0:
            break;

        case 1:
            teris1.RotBack();
            teris2.RotBack();

            break;

        case 2:
            teris2.RotBack();
            teris2.CheckRotClash(teris1, true);

            break;

        case 3:
            teris1.RotBack();
            teris1.CheckRotClash(teris2, true);
            break;
        }
    }
示例#2
0
 public bool CheckRotClash(TerisBlock another, bool isBlock)
 {
     foreach (Vector3 pos in currentPoints)
     {
         if (another.currentPoints.Contains(pos))
         {
             if (isBlock)
             {
                 another.RotBack();
                 return(false);
             }
             else
             {
                 RotBack();
                 another.RotBack();
                 return(false);
             }
         }
     }
     return(true);
 }