`
duyouhua1214
  • 浏览: 236263 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

游戏过场动画效果

    博客分类:
  • j2me
阅读更多
int effect, gridWidth, num, currentGridWidth,
        gridHeight, currentGridHeight, deltaWidth,
        deltaHeight, row, col, sx, sy, sw, sh;
int scnWidth = MY_SCREEN_WIDTH;
int scnWidth_Half = MY_SCREEN_WIDTH / 2;
int scnHeight = MY_SCREEN_HEIGHT;
int scnHeight_Half = MY_SCREEN_HEIGHT / 2;
 
/**
 * 初始化
 */
private void initEffect() {
    //subSelected = 0;
//     effect = getRandom(0, 20);
    effect = Math.abs(random.nextInt()) % 21;
    // System.out.println("Effect::" + effect);
    // effect = 19 + (ran.nextInt() >>> 1) % 2;
    // effect = 2;
    switch (effect) {
    default:
        break;
    case 0: {
        // 水平单一百叶窗效果
        gridWidth = scnWidth >> 2; // 每一条
        num = 4;
        currentGridWidth = 0;
        gridHeight = 0;
        currentGridHeight = 0;
        if (scnWidth == 176) {
            //deltaWidth = 8;
            deltaWidth = 8;
        } else if (scnWidth == 128) {
            deltaWidth = 2;
        } else {
            deltaWidth = 3;
        }
    }
    break;
    case 1: {
        // 竖直单一百叶窗效果
        gridHeight = scnHeight >> 2;
        num = 4;
        currentGridHeight = 0;
        currentGridWidth = 0;
        gridWidth = 0;
        if (scnWidth == 176) {
            deltaHeight = 8;
        } else if (scnWidth == 128) {
            deltaHeight = 2;
        } else {
            deltaHeight = 3;
        }
    }
    break;
    case 2: {
        // 纵横百叶窗效果
        gridWidth = scnWidth >> 1;
        gridHeight = scnHeight >> 1;
        currentGridWidth = 0;
        currentGridHeight = 0;
        num = 2;
        if (scnWidth == 176) {
            deltaWidth = 11;
            deltaHeight = 13;
        } else if (scnWidth == 128) {
            deltaWidth = 4;
            deltaHeight = 4;
        } else {
            deltaWidth = 8;
            deltaHeight = 9;
        }
    }
    break;
    [您有足够的威望或权限浏览此文章, 以下是加密内容:]
            case 3:
    case 4: {
        // 内聚/外散效果
        gridWidth = scnWidth >> 1;
        gridHeight = scnHeight >> 1;
        currentGridWidth = 0;
        currentGridHeight = 0;
        // num = 4;
        if (scnWidth == 176) {
            deltaWidth = 9;
            deltaHeight = 11;
        } else if (scnWidth == 128) {
            deltaWidth = 4;
            deltaHeight = 4;
        } else {
            deltaWidth = 9;
            deltaHeight = 11;
        }
    }
    break;
    case 5:
    case 6: {
        // 从左/右抽出
        currentGridWidth = 0;
        gridWidth = scnWidth;
        // col = 1;
        if (scnWidth == 176) {
            deltaWidth = 16;
        } else if (scnWidth == 128) {
            deltaWidth = 16;
        } else {
            deltaWidth = 16;
        }
    }
    break;
    case 7:
    case 8: {
        // 从上/下抽出
        currentGridHeight = 0;
        gridHeight = scnHeight;
        // row = 1;
        deltaHeight = 16;
    }
    break;
    case 9: // 从上下往中央
    case 10: {
        // 中央往上下
        currentGridHeight = 0;
        gridHeight = scnHeight_Half;
        deltaHeight = 8;
    }
    break;
    case 11: // 左右往中央
    case 12: {
        // 中央往左右
        currentGridWidth = 0;
        gridWidth = scnWidth_Half;
        deltaWidth = 8;
    }
    break;
    case 13: // 加号往外
    case 14: {
        // 加号往内
        currentGridHeight = currentGridWidth = 0;
        gridWidth = scnWidth_Half;
        gridHeight = scnHeight_Half;
        if (scnWidth == 176) {
            deltaWidth = 11;
            deltaHeight = 13;
        } else if (scnWidth == 128) {
            deltaWidth = deltaHeight = 8;
        } else {
            deltaWidth = 11;
            deltaHeight = 13;
        }
    }
    break;
    case 15: {
        // 从右上抽入
    }
    case 16: {
        // 从左上抽入
    }
    case 17: {
        // 从右下抽入
    }
    case 18: {
        // 从左下抽入
        currentGridHeight = currentGridWidth = 0;
        gridWidth = scnWidth;
        gridHeight = scnHeight;
        if (scnWidth == 176) {
            deltaWidth = 11;
            deltaHeight = 13;
        } else if (scnWidth == 128) {
            deltaWidth = deltaHeight = 8;
        } else {
            deltaWidth = 11;
            deltaHeight = 13;
        }
    }
    break;
    case 19: {
        // 水平梳理
        currentGridWidth = 0;
        gridWidth = scnWidth;
        gridHeight = scnHeight >> 2;
        row = 4;
        if (scnWidth == 176) {
            deltaWidth = 22;
        } else if (scnWidth == 128) {
            deltaWidth = 8;
        } else {
            deltaWidth = 8;
        }
    }
    break;
    case 20: {
        // 垂直梳理
        currentGridHeight = 0;
        gridHeight = scnHeight;
        gridWidth = scnWidth >> 2;
        col = 4;
        if (scnWidth == 176) {
            deltaHeight = 26;
        } else if (scnWidth == 128) {
            deltaHeight = 8;
        } else {
            deltaHeight = 8;
        }
    }
    break;
    }
    // 这里保证在过场动画显示过程中不会受到玩家按键的影响
    //cleanKeyStates(13);
    // gg.setClip(0, 0, scnWidth, scnHeight);
}
 
private void doPaintInterludeEffect() {
    switch (gameStates) {
    case -1:
        break;
    case 0:
        paintLogo();
        break;
    case 1:
        paintLoading();
        break;
    case 2:
        paintMainMenu();
        break;
    case 3:
        paintHelp();
        break;
    case 4:
        paintAbout();
        break;
    case 5:
        paintIntroduction();
        break;
    case 6:
        paintGuide();
        break;
    case 7:
        paintControl();
        break;
    case 8:
        paintCustom();
        break;
    case 9:
        paintStaff();
        break;
    case 10:
        paintOption();
        break;
    case 11:
        paintMain();
        break;
        /*********************** 玩家更新 ***********************/
    case GS_P_NAV: // 玩家选择单位
        paintGS_P_NAV();
        break;
    case GS_SYS_MENU: // 选择了空地,出现系统菜单
        paintGS_SYS_MENU();
        break;
    case GS_P_SLT_MOV: // 玩家选择移动目标
        paintGS_P_SLT_MOV();
        break;
 
    case GS_P_MOVING: // 玩家单位移动中
        paintGS_P_MOVING();
        break;
 
    case GS_P_CONFIRM_MOV: // 玩家确定移动菜单
        paintGS_P_CONFIRM_MOV();
        break;
    case GS_P_SLT_TARGET: // 玩家选择攻击目标
        paintGS_P_SLT_TARGET();
        break;
 
        /********************** 敌人更新 *********************/
    case GS_E_NAV: // 敌人选择单位
        paintGS_E_NAV();
        break;
    case GS_E_MOVING: // 敌人移动
        paintGS_E_MOVING();
        break;
        /********************** 公有更新 *********************/
    case GS_FIGHTING: // 战斗
        paintGS_FIGHTING();
        break;
    case GS_VIEW_UNIT_INFO: // 查看单位信息
        paintGS_VIEW_UNIT_INFO();
        break;
        /********************** 事件相关更新 *******************/
    case GS_TALK: // 对话
        paintGS_TALK();
        break;
 
    case GS_MOV: // 控制单位移动
        paintGS_MOV();
        break;
    case GS_FLASH_CELL: // 地块闪动
        paintGS_FLASH_CELL();
        break;
    }
}
 
/**
 * 画各种菜单/场景切换动画
 *
 * @author 薛永
 *
 *
 */
private void interludeEffect() {
    gg.setClip(0, 0, scnWidth, scnHeight);
    switch (effect) {
    default:
        break;
    case -1: {
        // 特效完毕
        sx = 0;
        sy = 0;
        sw = scnWidth;
        sh = scnHeight;
        switch (gameStates) {
        case -1:
            break;
        case 0:
            paintLogo();
            break;
        case 1:
            paintLoading();
            break;
        case 2:
            paintMainMenu();
            break;
        case 3:
            paintHelp();
            break;
        case 4:
            paintAbout();
            break;
        case 5:
            paintIntroduction();
            break;
        case 6:
            paintGuide();
            break;
        case 7:
            paintControl();
            break;
        case 8:
            paintCustom();
            break;
        case 9:
            paintStaff();
            break;
        case 10:
            paintOption();
            break;
        case 11:
            paintMain();
            break;
            /*********************** 玩家更新 ***********************/
        case GS_P_NAV: // 玩家选择单位
            paintGS_P_NAV();
            break;
        case GS_SYS_MENU: // 选择了空地,出现系统菜单
            paintGS_SYS_MENU();
            break;
        case GS_P_SLT_MOV: // 玩家选择移动目标
            paintGS_P_SLT_MOV();
            break;
 
        case GS_P_MOVING: // 玩家单位移动中
            paintGS_P_MOVING();
            break;
 
        case GS_P_CONFIRM_MOV: // 玩家确定移动菜单
            paintGS_P_CONFIRM_MOV();
            break;
        case GS_P_SLT_TARGET: // 玩家选择攻击目标
            paintGS_P_SLT_TARGET();
            break;
 
            /********************** 敌人更新 *********************/
        case GS_E_NAV: // 敌人选择单位
            paintGS_E_NAV();
            break;
        case GS_E_MOVING: // 敌人移动
            paintGS_E_MOVING();
            break;
            /********************** 公有更新 *********************/
        case GS_FIGHTING: // 战斗
            paintGS_FIGHTING();
            break;
        case GS_VIEW_UNIT_INFO: // 查看单位信息
            paintGS_VIEW_UNIT_INFO();
            break;
            /********************** 事件相关更新 *******************/
        case GS_TALK: // 对话
            paintGS_TALK();
            break;
 
        case GS_MOV: // 控制单位移动
            paintGS_MOV();
            break;
        case GS_FLASH_CELL: // 地块闪动
            paintGS_FLASH_CELL();
            break;
        }
 
    }
    break;
    case 1: {
        // 水平百叶窗
        if (currentGridHeight < gridHeight) {
            currentGridHeight += (deltaHeight++);
            for (int i = num; --i >= 0; ) {
                // gg.setColor(color);
                // gg.fillRect(0, i * gridLen, scnWidth, currentGridLen);
                sx = 0;
                sy = i * gridHeight;
                sw = scnWidth;
                sh = currentGridHeight;
                gg.setClip(0, i * gridHeight, scnWidth, currentGridHeight);
                doPaintInterludeEffect();
                gg.setClip(0, 0, scnWidth, scnHeight);
            }
        } else {
            effect = -1;
        }
    }
    break;
    case 0: {
        // 垂直百叶窗
        if (currentGridWidth < gridWidth) {
            currentGridWidth += (deltaWidth++);
            for (int i = num; --i >= 0; ) {
                // gg.setColor(color);
                sx = i * gridWidth;
                sy = 0;
                sw = currentGridWidth;
                sh = scnHeight;
                gg.setClip(i * gridWidth, 0, currentGridWidth, scnHeight);
                doPaintInterludeEffect();
                gg.setClip(0, 0, scnWidth, scnHeight);
            }
        } else {
            effect = -1;
        }
    }
    break;
    case 2: {
        // 水平纵横交错百叶窗
        if (currentGridHeight < gridHeight) {
            // S60:: 176 * 208
            currentGridHeight += (deltaHeight++);
            currentGridWidth += (deltaWidth++);
            // S40:: 128 * 128
            // currentGridHeight += 4;
            // currentGridWidth += 4;
            for (int i = num; --i >= 0; ) {
                for (int j = num; --j >= 0; ) {
                    sx = j * gridWidth;
                    sy = i * gridHeight;
                    sw = currentGridWidth;
                    sh = currentGridHeight;
                    gg.setClip(j * gridWidth, i * gridHeight,
                               currentGridWidth, currentGridHeight);
                    doPaintInterludeEffect();
                    gg.setClip(0, 0, scnWidth, scnHeight);
                }
            }
        } else {
            effect = -1;
        }
    }
    break;
    case 3: {
        // 内聚效果
        if (currentGridHeight < gridHeight) {
            // S60:: 176 * 208
            currentGridHeight += (deltaHeight++);
            currentGridWidth += (deltaWidth++);
            // S40::128 * 128
            // currentGridHeight += 4;
            // currentGridWidth += 4;
            sx = scnWidth_Half - currentGridWidth;
            sy = scnHeight_Half - currentGridHeight;
            sw = currentGridWidth << 1;
            sh = currentGridHeight << 1;
            gg.setClip(scnWidth_Half - currentGridWidth, scnHeight_Half
                       - currentGridHeight, currentGridWidth << 1,
                       currentGridHeight << 1);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
            // for (int i = num; --i >= 0;) {
            // for (int j = num; --j >= 0;) {
            // gg.setClip(scnWidth_Half - currentGridWidth,
            // scnHeight_Half - currentGridHeight,
            // currentGridWidth << 1, currentGridHeight << 1);
            // doPaintCreatePlayer();
            // gg.setClip(0, 0, scnWidth, scnHeight);
            // }
            // }
        } else {
            effect = -1;
        }
    }
    break;
    case 4: {
        // 外散效果
        if (currentGridHeight < gridHeight) {
            // S60::176 * 208
            currentGridHeight += (deltaHeight++);
            currentGridWidth += (deltaWidth++);
            // S40::128 * 128
            // currentGridHeight += 4;
            // currentGridWidth += 4;
            sx = 0;
            sy = 0;
            sw = scnWidth;
            sh = currentGridHeight;
            gg.setClip(0, 0, scnWidth, currentGridHeight);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
            sx = 0;
            sy = scnHeight - currentGridHeight;
            sw = scnWidth;
            sh = currentGridHeight;
            gg.setClip(0, scnHeight - currentGridHeight, scnWidth,
                       currentGridHeight);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
            sx = 0;
            sy = currentGridHeight;
            sw = currentGridWidth;
            sh = (scnHeight_Half - currentGridHeight) << 1;
            gg.setClip(0, currentGridHeight, currentGridWidth,
                       (scnHeight_Half - currentGridHeight) << 1);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
            sx = scnWidth - currentGridWidth;
            sy = currentGridHeight;
            sw = currentGridWidth;
            sh = (scnHeight_Half - currentGridHeight) << 1;
            gg.setClip(scnWidth - currentGridWidth, currentGridHeight,
                       currentGridWidth,
                       (scnHeight_Half - currentGridHeight) << 1);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
        } else {
            effect = -1;
        }
    }
    break;
    case 5: {
        // 从左抽出
        if (currentGridWidth < gridWidth) {
            currentGridWidth += (deltaWidth++);
            sx = 0;
            sy = 0;
            sw = currentGridWidth;
            sh = scnHeight;
            gg.setClip(0, 0, currentGridWidth, scnHeight);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
        } else {
            effect = -1;
        }
    }
    break;
    case 6: {
        // 从右抽出
        if (currentGridWidth < gridWidth) {
            currentGridWidth += (deltaWidth++);
            sx = scnWidth - currentGridWidth;
            sy = 0;
            sw = currentGridWidth;
            sh = scnHeight;
            gg.setClip(scnWidth - currentGridWidth, 0, currentGridWidth,
                       scnHeight);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
        } else {
            effect = -1;
        }
    }
    break;
    case 7: {
        // 从上抽出
        if (currentGridHeight < gridHeight) {
            currentGridHeight += (deltaHeight++);
            sx = 0;
            sy = 0;
            sw = scnWidth;
            sh = currentGridHeight;
            gg.setClip(0, 0, scnWidth, currentGridHeight);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
        } else {
            effect = -1;
        }
    }
    break;
    case 8: {
        // 从下抽出
        if (currentGridHeight < gridHeight) {
            currentGridHeight += (deltaHeight++);
            sx = 0;
            sy = scnHeight - currentGridHeight;
            sw = scnWidth;
            sh = currentGridHeight;
            gg.setClip(0, scnHeight - currentGridHeight, scnWidth,
                       currentGridHeight);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
        } else {
            effect = -1;
        }
    }
    break;
    case 9: {
        // 上下往中央
        if (currentGridHeight < gridHeight) {
            currentGridHeight += (deltaHeight++);
            sx = 0;
            sy = 0;
            sw = scnWidth;
            sh = currentGridHeight;
            gg.setClip(0, 0, scnWidth, currentGridHeight);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
            sx = 0;
            sy = scnHeight - currentGridHeight;
            sw = scnWidth;
            sh = currentGridHeight;
            gg.setClip(0, scnHeight - currentGridHeight, scnWidth,
                       currentGridHeight);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
        } else {
            effect = -1;
        }
    }
    break;
    case 10: {
        // 中央往上下
        if (currentGridHeight < gridHeight) {
            currentGridHeight += (deltaHeight++);
            sx = 0;
            sy = gridHeight - currentGridHeight;
            sw = scnWidth;
            sh = currentGridHeight << 1;
            gg.setClip(0, gridHeight - currentGridHeight, scnWidth,
                       currentGridHeight << 1);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
        } else {
            effect = -1;
        }
    }
    break;
    case 11: {
        // 左右往中央
        if (currentGridWidth < gridWidth) {
            currentGridWidth += (deltaWidth++);
            sx = 0;
            sy = 0;
            sw = currentGridWidth;
            sh = scnHeight;
            gg.setClip(0, 0, currentGridWidth, scnHeight);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
            sx = scnWidth - currentGridWidth;
            sy = 0;
            sw = currentGridWidth;
            sh = scnHeight;
            gg.setClip(scnWidth - currentGridWidth, 0, currentGridWidth,
                       scnHeight);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
        } else {
            effect = -1;
        }
    }
    break;
    case 12: {
        // 中央往左右
        if (currentGridWidth < gridWidth) {
            currentGridWidth += (deltaWidth++);
            sx = gridWidth - currentGridWidth;
            sy = 0;
            sw = currentGridWidth << 1;
            sh = scnHeight;
            gg.setClip(gridWidth - currentGridWidth, 0,
                       currentGridWidth << 1, scnHeight);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
        } else {
            effect = -1;
        }
    }
    break;
    case 13: {
        // 加号向外
        if (currentGridHeight < gridHeight) {
            currentGridHeight += (deltaHeight++);
            currentGridWidth += (deltaWidth++);
            sx = 0;
            sy = gridHeight - currentGridHeight;
            sw = scnWidth;
            sh = currentGridHeight << 1;
            gg.setClip(0, gridHeight - currentGridHeight, scnWidth,
                       currentGridHeight << 1);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
            sx = gridWidth - currentGridWidth;
            sy = 0;
            sw = currentGridWidth << 1;
            sh = gridHeight - currentGridHeight;
            gg.setClip(gridWidth - currentGridWidth, 0,
                       currentGridWidth << 1, gridHeight - currentGridHeight);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
            sx = gridWidth - currentGridWidth;
            sy = gridHeight + currentGridHeight;
            sw = currentGridWidth << 1;
            sh = gridHeight - currentGridHeight;
            gg.setClip(gridWidth - currentGridWidth, gridHeight
                       + currentGridHeight, currentGridWidth << 1, gridHeight
                       - currentGridHeight);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
        } else {
            effect = -1;
        }
    }
    break;
    case 14: {
        // 加号向内
        if (currentGridWidth < gridWidth) {
            currentGridHeight += (deltaHeight++);
            currentGridWidth += (deltaWidth++);
            int _width = currentGridWidth;
            int _height = currentGridHeight;
            sx = 0;
            sy = 0;
            sw = _width;
            sh = _height;
            gg.setClip(0, 0, _width, _height);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
            sx = 0;
            sy = scnHeight - currentGridHeight;
            sw = _width;
            sh = _height;
            gg.setClip(0, scnHeight - currentGridHeight, _width, _height);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
            sx = scnWidth - currentGridWidth;
            sy = 0;
            sw = _width;
            sh = _height;
            gg.setClip(scnWidth - currentGridWidth, 0, _width, _height);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnWidth);
            sx = scnWidth - currentGridWidth;
            sy = scnHeight - currentGridHeight;
            sw = _width;
            sh = _height;
            gg.setClip(scnWidth - currentGridWidth, scnHeight
                       - currentGridHeight, _width, _height);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
        } else {
            effect = -1;
        }
    }
    break;
    case 15: {
        // 向右上抽入
        if (currentGridHeight < gridHeight) {
            currentGridHeight += (deltaHeight++);
            currentGridWidth += (deltaWidth++);
            sx = 0;
            sy = scnHeight - currentGridHeight;
            sw = currentGridWidth;
            sh = currentGridHeight;
            gg.setClip(0, scnHeight - currentGridHeight, currentGridWidth,
                       currentGridHeight);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
        } else {
            effect = -1;
        }
    }
    break;
    case 16: {
        // 向左上抽入
        if (currentGridHeight < gridHeight) {
            currentGridHeight += (deltaHeight++);
            currentGridWidth += (deltaWidth++);
            sx = gridWidth - currentGridWidth;
            sy = gridHeight - currentGridHeight;
            sw = currentGridWidth;
            sh = currentGridHeight;
            gg.setClip(gridWidth - currentGridWidth, gridHeight
                       - currentGridHeight, currentGridWidth,
                       currentGridHeight);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
        } else {
            effect = -1;
        }
    }
    break;
    case 17: {
        // 向右下抽入
        if (currentGridHeight < gridHeight) {
            currentGridHeight += (deltaHeight++);
            currentGridWidth += (deltaWidth++);
            sx = 0;
            sy = 0;
            sw = currentGridWidth;
            sh = currentGridHeight;
            gg.setClip(0, 0, currentGridWidth, currentGridHeight);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
        } else {
            effect = -1;
        }
    }
    break;
    case 18: {
        // 向左下抽入
        if (currentGridHeight < gridHeight) {
            currentGridHeight += (deltaHeight++);
            currentGridWidth += (deltaWidth++);
            sx = scnWidth - currentGridWidth;
            sy = 0;
            sw = currentGridWidth;
            sh = currentGridHeight;
            gg.setClip(scnWidth - currentGridWidth, 0, currentGridWidth,
                       currentGridHeight);
            doPaintInterludeEffect();
            gg.setClip(0, 0, scnWidth, scnHeight);
        } else {
            effect = -1;
        }
    }
    break;
    case 19: {
        // 水平梳理
        if (currentGridWidth < gridWidth) {
            currentGridWidth += (deltaWidth++);
            for (int i = row; --i >= 0; ) {
                if ((i & 1) == 0) {
                    sx = 0;
                    sy = (i) * gridHeight;
                    sw = currentGridWidth;
                    sh = gridHeight;
                    gg.setClip(0, (i) * gridHeight, currentGridWidth,
                               gridHeight);
                } else {
                    sx = scnWidth - currentGridWidth;
                    sy = (i) * gridHeight;
                    sw = currentGridWidth;
                    sh = gridHeight;
                    gg.setClip(scnWidth - currentGridWidth, (i)
                               * gridHeight, currentGridWidth, gridHeight);
                }
                doPaintInterludeEffect();
                gg.setClip(0, 0, scnWidth, scnHeight);
            }
        } else {
            effect = -1;
        }
    }
    break;
    case 20: {
        // 垂直梳理
        if (currentGridHeight < gridHeight) {
            currentGridHeight += (deltaHeight++);
            for (</pr

  


  
分享到:
评论

相关推荐

    带序列发生器的过场动画.rar

    在UE4(Unreal Engine 4)中,过场动画是一种强大的工具,用于在游戏或交互式体验中呈现非玩家控制的剧情、过渡效果或重要事件。这些动画通常结合了关卡设计、摄像机控制、角色动画以及视频渲染等多个方面,以创造出...

    UE4Matinee & 过场动画

    **UE4 Matinee & 过场动画** UE4(Unreal Engine 4)是Epic Games开发的一款强大的游戏引擎,广泛应用于游戏制作、虚拟现实、影视特效等领域。在UE4中,Matinee是一个内置的过场动画工具,它允许开发者创建复杂的...

    过场动画编辑

    过场动画编辑是游戏开发和电影制作中一个重要的环节,它负责在叙事过程中连接不同的场景,为玩家或观众提供故事的过渡和情感的渲染。在本文中,我们将深入探讨过场动画编辑,尤其是与Unity(u3dpackage)相关的技术...

    冰火围城过场动画资源

    综上所述,“冰火围城过场动画资源”包含了构建游戏过场动画所必需的各种元素:shaders负责渲染特效和光照,材质定义物体表面的视觉特性,图片提供视觉细节,而meshes则构建了3D模型的基础。通过合理利用和优化这些...

    个性化过场动画

    为了在应用中实现过场动画,开发者通常会使用编程语言中的图形库或框架,例如Android的Android Animation API,iOS的Core Animation,或是Unity3D等游戏引擎。这些工具提供了丰富的动画控制功能,包括帧速率控制、...

    Unity3D使用Timeline实现过场动画

    在创建动态、引人入胜的游戏场景时,过场动画扮演着至关重要的角色。"Unity3D使用Timeline实现过场动画"的主题涉及到如何运用Unity的创新工具Timeline和Cinemachine来制作流畅、专业的过渡效果。 Timeline是Unity3D...

    13种烟花粒子效果帧动画.zip

    6. **应用场景**:这些粒子效果帧动画可以被集成到2D或3D游戏引擎中,用于角色技能、环境交互、过场动画等场景。例如,烟花可用于庆祝胜利的场景,爆炸可以是战斗中的特效,而漂浮物则可能出现在梦幻或自然的背景中...

    h5 实现视频动画效果

    这种纯H5实现的视频动画效果适用于多种场景,如产品演示、广告、教育内容、游戏过场动画等,尤其适合短片段制作,因为它们加载快速且跨平台兼容性良好。 总结,使用纯H5实现视频动画效果,结合HTML5的`&lt;video&gt;`元素...

    3D UI 界面过场3D 动画 空间拾取 移动旋转

    例如,在过场动画中,3D动画可以用来展示场景变换、角色动作或者信息提示,提升用户体验。高质量的3D动画需要考虑帧率、平滑度以及与用户交互的响应性。 "空间拾取"则是指用户在3D环境中通过鼠标、触摸或其他输入...

    撕开日历本flash动画特效

    2. 娱乐媒体:网络游戏中,作为过场动画,展现游戏进程或角色的成长。 3. 营销推广:企业宣传视频中,用撕开日历的方式展示产品发布会、促销活动等关键日期。 4. 设计作品:平面设计师可能会将这个效果应用于电子...

    flash遮罩动画学习源文件

    例如,在网页加载时的动态效果、游戏过场动画、信息图表的交互展示等方面,都可以看到遮罩技术的巧妙运用。 7. **学习方法**: 学习这个源文件,可以从以下几个方面入手: - 分析结构:查看不同图层,了解遮罩层...

    一个简单的用Unity3d做的基于ugui,doTween,timeline,动画系统的解谜游戏

    在游戏场景中,Timeline可以用来制作过场动画、角色行为序列或游戏逻辑流程。它允许开发者以时间轴的方式直观地组织和控制音频、视频、动画和脚本事件,为游戏设计带来了更高的灵活性和控制力。 4. **Unity动画系统...

    Unity3D逐帧播放动画脚本1

    这种技术常用于2D游戏或某些特殊的3D动画效果,例如像素动画或者低帧率的过场动画。 描述中提到的关键点有两个: 1. `frames : Texture[]`:这是一个在Unity3D中声明的数组,用于存储一系列的纹理(Texture)对象。...

    网络游戏-游戏效果构建方法及装置.zip

    动画过渡是使游戏动作流畅的关键,包括角色动作、物件交互、过场动画等。骨骼动画系统是常用的技术,通过绑定骨骼和模型,可以实现灵活的动作控制。物理模拟则让游戏世界更接近现实,如碰撞检测、重力模拟等,让玩家...

    Cutscene Creator uSequencer 1.2.6

    《Cutscene Creator uSequencer 1.2.6:打造引人入胜的游戏过场动画》 在游戏开发领域,过场动画(Cutscene)是讲述故事、展现剧情转折和角色互动的重要手段。Cutscene Creator uSequencer 1.2.6是一款专为游戏...

    Unity3d技术之2D骨骼动画插件Puppet2D v2.0

    6. **实时预览**:开发者可以直接在Unity编辑器中预览动画,无需导出或运行游戏,这有助于及时调整和优化动画效果。 7. **兼容性与性能**:Puppet2D v2.0与Unity的其他组件和系统无缝集成,如Sprite Renderer和物理...

    帧动画素材(两套)(png文件)

    使用这些豹子和姑娘跑动的PNG素材,你可以创造出富有动感的场景,例如游戏过场动画、教学演示或动态图标。 需要注意的是,由于这些素材仅包含图像文件,不包括任何代码或动画播放逻辑,因此在实际应用中,开发者...

    视频素材高清游戏CG故事剧情动画.txt

    - **游戏**:现代游戏中的过场动画、角色模型等几乎都是CG产物。 - **广告**:许多商业广告利用CG技术来创造引人注目的视觉效果。 #### 3. 游戏CG故事剧情动画的价值 - **增强沉浸感**:通过精美的CG动画讲述游戏...

    游戏源码下载

    2. **js图片轮播:VCD包装盒个性幻灯片**:虽然这不是一个游戏,但它展示了JavaScript如何创建动态的图片展示效果,这对于游戏中的过场动画或者背景切换等场景非常有用。 3. **CSS3打造百度贴吧的3D翻牌效果**:这...

    3D开门动画(swf)

    例如,它可以作为网站的欢迎页面,也可以作为游戏中的过场动画,甚至可以用于虚拟现实的模拟操作,提供更直观的交互体验。 总的来说,3D开门动画(swf)是一个融合了3D技术、ActionScript编程和音效设计的综合实例,...

Global site tag (gtag.js) - Google Analytics