예제 #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);
    }
예제 #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());
    }
예제 #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);
 }