示例#1
0
 protected override bool isSuitable(CubeManager mgr)
 {
     if (cubesInDecomposition.value.Count > 0)
     {
         return(mgr.IsTouchingNeighbourInCompose() && !mgr.IsInCompose());
     }
     return(mgr.CanDecompose() && !mgr.IsInCompose());
 }
示例#2
0
 protected override void makeAction(CubeManager mgr)
 {
     if (mgr.IsInCompose()) {
         cubesInDecomposition.value.Remove(mgr.transform);
         mgr.ToDecomposeWaiting();
     } else {
         cubesInDecomposition.value.Add(mgr.transform);
         mgr.ToDecompose();
     }
 }
示例#3
0
 public bool IsTouchingNeighbourInCompose()
 {
     foreach (Transform cube in GetNeighbourPlayCubesInTouch())
     {
         CubeManager mgr = cube.GetComponent <CubeManager>();
         if (mgr.IsInCompose())
         {
             return(true);
         }
     }
     return(false);
 }
示例#4
0
 protected override void makeAction(CubeManager mgr)
 {
     if (mgr.IsInCompose())
     {
         cubesInDecomposition.value.Remove(mgr.transform);
         mgr.ToDecomposeWaiting();
     }
     else
     {
         cubesInDecomposition.value.Add(mgr.transform);
         mgr.ToDecompose();
     }
 }
示例#5
0
 protected override bool isSuitable(CubeManager mgr)
 {
     if (cubesInDecomposition.value.Count > 0) {
         return mgr.IsTouchingNeighbourInCompose() && !mgr.IsInCompose();
     }
     return mgr.CanDecompose() && !mgr.IsInCompose();
 }
示例#6
0
 protected override bool isSuitable(CubeManager mgr)
 {
     return mgr.IsInCompose() || mgr.IsWaitingForDecompose();
 }
示例#7
0
 protected override bool isSuitable(CubeManager mgr)
 {
     return(mgr.IsInCompose() || mgr.IsWaitingForDecompose());
 }
示例#8
0
    private bool isNotSuitableForComposeAlready(Transform cube)
    {
        CubeManager mgr = cube.GetComponent <CubeManager>();

        return(!isSuitable(mgr) && !mgr.IsInCompose());
    }