Beispiel #1
0
        Vector3Int GetGoalContact(Transform target)
        {
            var pos = HexUtil.GetNearestCoord(target.position);

            pos.y = 0;
            while (level[pos] != 2 && pos.y < 50)
            {
                pos += Vector3Int.up;
            }
            target.position = HexUtil.ToWorld(pos);
            return(pos);
        }