コード例 #1
0
    public static Tetromino createTetromino(GameField field)
    {
        Tetromino newTetromino = TetrominoControls.ttm_create_new(field);

        TetrominoControls.bn_map_forEachTrue(GraphicDefs.blk_draw, newTetromino);
        return(newTetromino);
    }
コード例 #2
0
    public static Tetromino cloneTetromino(Tetromino ttm, GameField field)
    {
        if (ttm == null)
        {
            return(null);
        }
        Tetromino clone = TetrominoControls.ttm_create_copy(ttm, field);

        TetrominoControls.bn_map_forEachTrue(GraphicDefs.blk_draw, clone);
        return(clone);
    }
コード例 #3
0
    public static void CreateGhost(Tetromino ttm)
    {
        if (ttm.ghost != null)
        {
            blockControl.blk_cnj_clear(ttm.ghost.GetBlocks());
        }
        Ghost ghost = new Ghost(ttm);

        TetrominoControls.bn_map_forEachTrue(GraphicDefs.blk_drawGhost, ghost, TetrominoControls.mapTetromino(ttm.GetPiece()));
        TetrominoControls.fitPiece(ghost, ghost.GetField());
        ttm.ghost = ghost;
    }