コード例 #1
0
    int GetDirection()
    {
        if (generatr_pointer < GenerateList.Length)
        {
            generatr_pointer += 1;
            return(Directions.ToInt(GenerateList[generatr_pointer - 1]));
        }

        // TODO
        if (level.IsShape())
        {
            return(0);
        }
        int dir = Random.Range(1, 5);

        while (neighbors[4 - dir] == last_generater)
        {
            dir = Random.Range(1, 5);
        }
        return(dir);
    }