Example #1
0
    protected override void makeAction(CubeManager mgr)
    {
        GameObject pl = player.value;

        if (pl == null)
        {
            pl = mgr.GetOtherPlayCubesInTouch().First().parent.gameObject;
        }
        mgr.JoinToPlayer(player.value.transform);
    }
Example #2
0
    public List <Transform> GetTouchingOtherPlayCubes()
    {
        List <Transform> touchingCubes = new List <Transform>();

        foreach (Transform child in childCubes)
        {
            CubeManager mgr = child.GetComponent <CubeManager>();
            foreach (Transform cube in mgr.GetOtherPlayCubesInTouch())
            {
                touchingCubes.Add(cube);
            }
        }
        return(touchingCubes.Distinct().ToList());
    }
Example #3
0
 protected override void makeAction(CubeManager mgr)
 {
     GameObject pl = player.value;
     if (pl == null) {
         pl = mgr.GetOtherPlayCubesInTouch().First().parent.gameObject;
     }
     mgr.JoinToPlayer(player.value.transform);
 }